users: fix avatar handling and various translations
This commit is contained in:
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user