We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8560a commit 3fc43ebCopy full SHA for 3fc43eb
src/redux/emptyApi.ts
@@ -12,6 +12,16 @@ const baseQuery = fetchBaseQuery({
12
headers.map(([idx, val]: [string, string]) => h.set(idx, val))
13
return h
14
},
15
+ paramsSerializer: (params) => {
16
+ const searchParams = new URLSearchParams()
17
+ Object.entries(params).forEach(([key, value]) => {
18
+ if (Array.isArray(value)) {
19
+ // Serialize arrays with explode: true format (repeated keys)
20
+ value.forEach((item) => searchParams.append(key, item))
21
+ } else if (value !== undefined && value !== null) searchParams.append(key, String(value))
22
+ })
23
+ return searchParams.toString()
24
+ },
25
})
26
27
// initialize an empty api service that we'll inject endpoints into later as needed
0 commit comments