滚动条样式更新
This commit is contained in:
@@ -73,9 +73,11 @@ const apiRequest = async (url, options = {}) => {
|
||||
|
||||
export const eventService = {
|
||||
getEvents: (params = {}) => {
|
||||
// Filter out null, undefined, and empty strings (but keep 0 and false)
|
||||
// Filter out null, undefined, empty strings, and internal fields (starting with _)
|
||||
const cleanParams = Object.fromEntries(
|
||||
Object.entries(params).filter(([_, v]) => v !== null && v !== undefined && v !== '')
|
||||
Object.entries(params).filter(([key, v]) =>
|
||||
v !== null && v !== undefined && v !== '' && !key.startsWith('_')
|
||||
)
|
||||
);
|
||||
const query = new URLSearchParams(cleanParams).toString();
|
||||
return apiRequest(`/api/events?${query}`);
|
||||
|
||||
Reference in New Issue
Block a user