refactor: remove await

This commit is contained in:
P. Reis 2025-02-26 11:19:15 -03:00
parent e17360d49c
commit 1730274e70

View file

@ -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);
} }