From 833c39969b89c0d5de0b6616a253afea03e5fbb7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 23 Mar 2020 19:42:26 +0900 Subject: [PATCH] Refactor --- src/server/api/endpoints/notes/state.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/api/endpoints/notes/state.ts b/src/server/api/endpoints/notes/state.ts index 2ec4a93d5..b41b56162 100644 --- a/src/server/api/endpoints/notes/state.ts +++ b/src/server/api/endpoints/notes/state.ts @@ -28,15 +28,15 @@ export default define(meta, async (ps, user) => { const [favorite, watching] = await Promise.all([ NoteFavorites.count({ where: { - userId: user.id, - noteId: ps.noteId + userId: user.id, + noteId: ps.noteId }, take: 1 }), NoteWatchings.count({ where: { - userId: user.id, - noteId: ps.noteId + userId: user.id, + noteId: ps.noteId }, take: 1 })