From b331d1b0ebb11bf33acd19614567562666f4a6fe Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Mon, 17 Oct 2022 16:46:42 -0400 Subject: [PATCH] use await for notes.countBy --- packages/backend/src/services/note/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index 3d5b308f35..8ba2963d5e 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -462,7 +462,7 @@ export default async (user: { id: User['id']; username: User['username']; host: lastNotedAt: new Date(), }); - Notes.countBy({ + const count = await Notes.countBy({ userId: user.id, channelId: data.channel.id, }).then(count => {