Skip to content

Commit

Permalink
React Admin: remove id from PATCH (edit) body (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky authored Dec 10, 2023
1 parent ecdc1f5 commit 434b903
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 @@ -79,7 +79,8 @@ export const dataProvider: DataProvider = {
}
},
update: async (resource, params) => {
const {data} = await axios.patch(`${apiUrl}/${resource}/${params.id}`, params.data)
const {id, ...input} = params.data
const {data} = await axios.patch(`${apiUrl}/${resource}/${id}`, input)

return {data}
},
Expand Down

0 comments on commit 434b903

Please sign in to comment.