From 275e1c8de91fb0b666044814efac0c8e2807ee68 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 3bae617b4f..73fc37ff8a 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';