diff --git a/frontend/static/js/api/MyProfile.js b/frontend/static/js/api/MyProfile.js index 3724f34..549f116 100644 --- a/frontend/static/js/api/MyProfile.js +++ b/frontend/static/js/api/MyProfile.js @@ -75,8 +75,10 @@ class MyProfile extends Profile const response = await this.client._patch_file(`/api/profiles/settings`, formData); const responseData = await response.json(); - if (response.ok) + if (response.ok) { + this.avatar = responseData.avatar; return null; + } return responseData; } @@ -84,8 +86,10 @@ class MyProfile extends Profile const response = await this.client._delete('/api/profiles/settings'); const responseData = await response.json(); - if (response.ok) + if (response.ok) { + this.avatar = responseData.avatar; return null; + } return responseData; }