Skip to content

Commit

Permalink
fix: update endpoint used to update profile photo
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaros committed Apr 20, 2023
1 parent 32ec360 commit 0bc3bcd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/profile/profile.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ function getProfileUpdatePromise({ key, value, payload, userId, d2 }) {
if (key === 'avatar') {
if (value) {
// Set avatar
// Post avatar directly to the `/user/<ID>` endpoint, because d2 update calls to `/me` cause issues
return api.patch(`/users/${userId}`, { avatar: value.id })
return api.update('me', { avatar: { id: value.id } })
} else {
// Clear avatar
return removeAvatar(userId, api)
Expand Down

0 comments on commit 0bc3bcd

Please sign in to comment.