Merge branch 'refactor-remove-await' into 'main'

refactor: remove await

See merge request soapbox-pub/ditto!688
This commit is contained in:
Alex Gleason 2025-02-26 14:30:54 +00:00
commit 4b321f21fc

View file

@ -100,11 +100,11 @@ const accountLookupController: AppController = async (c) => {
const event = await lookupAccount(decodeURIComponent(acct), c.var);
if (event) {
assertAuthenticated(c, event);
return c.json(await renderAccount(event));
return c.json(renderAccount(event));
}
try {
const pubkey = bech32ToPubkey(decodeURIComponent(acct));
return c.json(await accountFromPubkey(pubkey!));
return c.json(accountFromPubkey(pubkey!));
} catch {
return c.json({ error: 'Could not find user.' }, 404);
}