Refactor: further extract controller logic from routers

This commit is contained in:
Aaron William Po
2023-12-04 00:59:13 -05:00
parent da8d5806bc
commit 4b2ce394c1
28 changed files with 325 additions and 308 deletions

View File

@@ -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,
});