diff --git a/src/components/Admin/dataProvider.ts b/src/components/Admin/dataProvider.ts index 68b420b6..c236a484 100644 --- a/src/components/Admin/dataProvider.ts +++ b/src/components/Admin/dataProvider.ts @@ -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} },