mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Refactor: further extract controller logic from routers
This commit is contained in:
@@ -8,9 +8,9 @@ const sendUpdateUserAvatarRequest = async ({
|
||||
userId,
|
||||
}: UpdateProfileRequestParams) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('image', file);
|
||||
|
||||
const response = await fetch(`/api/users/${userId}/`, {
|
||||
const response = await fetch(`/api/users/${userId}/profile/update-avatar`, {
|
||||
method: 'PUT',
|
||||
body: formData,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user