settings: fix avatar url not updating

This commit is contained in:
AdrienLSH 2024-04-19 11:23:30 +02:00
parent 9bc3092a0e
commit a34eea29f7

View File

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