From ab995930ff26419c5cc11c5a9115f6d4517276e9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 5 Feb 2020 21:41:49 +0900 Subject: [PATCH] Refactor --- src/server/api/endpoints/messaging/messages/read.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/server/api/endpoints/messaging/messages/read.ts b/src/server/api/endpoints/messaging/messages/read.ts index dd3449af15..1c25a26238 100644 --- a/src/server/api/endpoints/messaging/messages/read.ts +++ b/src/server/api/endpoints/messaging/messages/read.ts @@ -37,9 +37,7 @@ export const meta = { }; export default define(meta, async (ps, user) => { - const message = await MessagingMessages.findOne({ - id: ps.messageId, - }); + const message = await MessagingMessages.findOne(ps.messageId); if (message == null) { throw new ApiError(meta.errors.noSuchMessage);