diff --git a/frontend/src/components/Items/DeleteItem.tsx b/frontend/src/components/Items/DeleteItem.tsx index 9e61c348..cbefb39f 100644 --- a/frontend/src/components/Items/DeleteItem.tsx +++ b/frontend/src/components/Items/DeleteItem.tsx @@ -31,7 +31,7 @@ const DeleteItem = ({ id, onSuccess }: DeleteItemProps) => { const { handleSubmit } = useForm() const deleteItem = async (id: string) => { - await ItemsService.deleteItem({ id: id }) + await ItemsService.deleteItem({ path: { id } }) } const mutation = useMutation({ diff --git a/frontend/src/components/Items/EditItem.tsx b/frontend/src/components/Items/EditItem.tsx index 3d57f559..9fa043d7 100644 --- a/frontend/src/components/Items/EditItem.tsx +++ b/frontend/src/components/Items/EditItem.tsx @@ -59,7 +59,7 @@ const EditItem = ({ item, onSuccess }: EditItemProps) => { const mutation = useMutation({ mutationFn: (data: FormData) => - ItemsService.updateItem({ id: item.id, requestBody: data }), + ItemsService.updateItem({ path: { id: item.id }, body: data }), onSuccess: () => { showSuccessToast("Item updated successfully") setIsOpen(false) diff --git a/frontend/src/components/UserSettings/ChangePassword.tsx b/frontend/src/components/UserSettings/ChangePassword.tsx index aeb85370..c2784d37 100644 --- a/frontend/src/components/UserSettings/ChangePassword.tsx +++ b/frontend/src/components/UserSettings/ChangePassword.tsx @@ -53,7 +53,7 @@ const ChangePassword = () => { const mutation = useMutation({ mutationFn: (data: UpdatePassword) => - UsersService.updatePasswordMe({ requestBody: data }), + UsersService.updatePasswordMe({ body: data }), onSuccess: () => { showSuccessToast("Password updated successfully") form.reset() diff --git a/frontend/src/components/UserSettings/UserInformation.tsx b/frontend/src/components/UserSettings/UserInformation.tsx index 4bfaf600..93a65aa4 100644 --- a/frontend/src/components/UserSettings/UserInformation.tsx +++ b/frontend/src/components/UserSettings/UserInformation.tsx @@ -50,7 +50,7 @@ const UserInformation = () => { const mutation = useMutation({ mutationFn: (data: UserUpdateMe) => - UsersService.updateUserMe({ requestBody: data }), + UsersService.updateUserMe({ body: data }), onSuccess: () => { showSuccessToast("User updated successfully") toggleEditMode()