getAndRenderAccount: render account from pubkey if not found

This commit is contained in:
Alex Gleason 2024-02-19 14:20:00 -06:00
parent fe6dd01b68
commit be3f1104db
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -73,9 +73,9 @@ const accountController: AppController = async (c) => {
const event = await getAuthor(pubkey);
if (event) {
return c.json(await renderAccount(event));
} else {
return c.json(await accountFromPubkey(pubkey));
}
return c.json({ error: 'Could not find user.' }, 404);
};
const accountLookupController: AppController = async (c) => {