Merge branch 'main' of codeberg.org:adrien-lsh/ft_transcendence

This commit is contained in:
Xamora 2024-04-20 10:15:56 +02:00
commit 0bc61f7dba

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