Skip to content

Commit

Permalink
admin: fix unnecessary 308 redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky committed Dec 10, 2023
1 parent 75fd2f1 commit 86bffa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Admin/dataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const dataProvider: DataProvider = {
// ...getPaginationQuery(params.pagination),
// ...getOrderingQuery(params.sort),
}
const {data} = await axios.get(`${apiUrl}/${resource}/?${stringify(query)}`)
const stringifiedQuery = stringify(query)
const {data} = await axios.get(`${apiUrl}/${resource}${stringifiedQuery ? `/?${stringifiedQuery}` : ''}`)

// client-side sort
const {field, order} = params.sort
Expand Down

0 comments on commit 86bffa7

Please sign in to comment.