refactor(updateInstanceController): move async function out of callback

This commit is contained in:
P. Reis
2024-11-15 11:20:10 -03:00
parent 33b36ba0ed
commit d9cc8cc7c2
2 changed files with 5 additions and 4 deletions

View File

@@ -311,10 +311,11 @@ export const updateInstanceController: AppController = async (c) => {
return c.json(result.error, 422);
}
const meta = await getInstanceMetadata(await Storages.db(), c.req.raw.signal);
await updateAdminEvent(
{ kinds: [0], authors: [pubkey], limit: 1 },
async (_) => {
const meta = await getInstanceMetadata(await Storages.db(), c.req.raw.signal);
(_) => {
const {
title,
description,