mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'fix-ensure-remove-exists' into 'main'
fix: call remove if it's available See merge request soapbox-pub/ditto!692
This commit is contained in:
commit
466245633c
1 changed files with 6 additions and 5 deletions
|
|
@ -160,11 +160,12 @@ const adminActionController: AppController = async (c) => {
|
|||
}
|
||||
if (data.type === 'revoke_name') {
|
||||
n.revoke_name = true;
|
||||
relay.remove!([{ kinds: [30360], authors: [await conf.signer.getPublicKey()], '#p': [authorId] }]).catch(
|
||||
(e: unknown) => {
|
||||
try {
|
||||
await relay.remove!([{ kinds: [30360], authors: [await conf.signer.getPublicKey()], '#p': [authorId] }]);
|
||||
} catch (e) {
|
||||
logi({ level: 'error', ns: 'ditto.api.admin.account.action', type: data.type, error: errorJson(e) });
|
||||
},
|
||||
);
|
||||
return c.json({ error: 'Unexpected runtime error' }, 500);
|
||||
}
|
||||
}
|
||||
|
||||
await updateUser(authorId, n, c);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue