From fc27890f139c1ae0378b42cd912558272668723d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 Apr 2019 00:34:49 +0900 Subject: [PATCH] Refactor --- src/models/repositories/note.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index 7a48d24e1..98ed2bddc 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -103,7 +103,7 @@ export class NoteRepository extends Repository { const host = note.userHost; async function populatePoll() { - const poll = await Polls.findOne({ noteId: note.id }).then(ensure); + const poll = await Polls.findOne(note.id).then(ensure); const choices = poll.choices.map(c => ({ text: c, votes: poll.votes[poll.choices.indexOf(c)],