mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'refactor-remove-await' into 'main'
refactor: remove await See merge request soapbox-pub/ditto!688
This commit is contained in:
commit
937a9a58ee
1 changed files with 2 additions and 2 deletions
|
|
@ -100,11 +100,11 @@ const accountLookupController: AppController = async (c) => {
|
||||||
const event = await lookupAccount(decodeURIComponent(acct), c.var);
|
const event = await lookupAccount(decodeURIComponent(acct), c.var);
|
||||||
if (event) {
|
if (event) {
|
||||||
assertAuthenticated(c, event);
|
assertAuthenticated(c, event);
|
||||||
return c.json(await renderAccount(event));
|
return c.json(renderAccount(event));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const pubkey = bech32ToPubkey(decodeURIComponent(acct));
|
const pubkey = bech32ToPubkey(decodeURIComponent(acct));
|
||||||
return c.json(await accountFromPubkey(pubkey!));
|
return c.json(accountFromPubkey(pubkey!));
|
||||||
} catch {
|
} catch {
|
||||||
return c.json({ error: 'Could not find user.' }, 404);
|
return c.json({ error: 'Could not find user.' }, 404);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue