users: fix avatar handling and various translations

This commit is contained in:
Girish Ramakrishnan
2025-09-16 12:05:47 +02:00
parent 0530a58530
commit 405302e2f0
7 changed files with 106 additions and 54 deletions
+11
View File
@@ -129,6 +129,17 @@ function create() {
if (result.status !== 204) return [result];
return [null];
},
async unsetAvatar(id) {
let result;
try {
result = await fetcher.del(`${API_ORIGIN}/api/v1/users/${id}/avatar`, null, { access_token: accessToken });
} catch (e) {
return [e];
}
if (result.status !== 204) return [result];
return [null];
},
async setGhost(id, password, expiresAt = 0) {
const data = { password };