Skip to content

Commit e85eea0

Browse files
author
Emily Ehlert
committed
frontend: Fix users api
When saving settings one can update the current users name and mail. The API however only put the user without specifying the user id, making the second part of the saving settings operation fail. Adjust API to match backend.
1 parent bf7bc51 commit e85eea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/api/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export const deleteUser = async (id: number): Promise<void> => {
1515
};
1616

1717
export const updateUser = async (user: User): Promise<void> => {
18-
return await ApiClient.put<void>(`/users`, user);
18+
return await ApiClient.put<void>(`/users/${user.id}`, user);
1919
};

0 commit comments

Comments
 (0)