settings: fix avatar url not updating
This commit is contained in:
parent
9bc3092a0e
commit
a34eea29f7
@ -75,8 +75,10 @@ class MyProfile extends Profile
|
|||||||
const response = await this.client._patch_file(`/api/profiles/settings`, formData);
|
const response = await this.client._patch_file(`/api/profiles/settings`, formData);
|
||||||
const responseData = await response.json();
|
const responseData = await response.json();
|
||||||
|
|
||||||
if (response.ok)
|
if (response.ok) {
|
||||||
|
this.avatar = responseData.avatar;
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
return responseData;
|
return responseData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,8 +86,10 @@ class MyProfile extends Profile
|
|||||||
const response = await this.client._delete('/api/profiles/settings');
|
const response = await this.client._delete('/api/profiles/settings');
|
||||||
const responseData = await response.json();
|
const responseData = await response.json();
|
||||||
|
|
||||||
if (response.ok)
|
if (response.ok) {
|
||||||
|
this.avatar = responseData.avatar;
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
return responseData;
|
return responseData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user