From fcbe004e7c9a20ad3672c73abf43e73f6f5f74c2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 18:17:27 +0900 Subject: [PATCH] Refactor --- src/services/note/polls/vote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/note/polls/vote.ts b/src/services/note/polls/vote.ts index 3bae617b4..73fc37ff8 100644 --- a/src/services/note/polls/vote.ts +++ b/src/services/note/polls/vote.ts @@ -8,7 +8,7 @@ import { genId } from '../../../misc/gen-id'; import { createNotification } from '../../create-notification'; export default async function(user: User, note: Note, choice: number) { - const poll = await Polls.findOne({ noteId: note.id }); + const poll = await Polls.findOne(note.id); if (poll == null) throw 'poll not found';