From 69662e24c3ab135e3618d1a28c7914efdff66f24 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 17:24:56 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/notes/polls/vote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index 68dee66828..e8b8b66da5 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -124,7 +124,7 @@ export default define(meta, async (ps, user) => { // Increment votes count const index = ps.choice + 1; // In SQL, array index is 1 based - await Polls.query(`UPDATE poll SET votes[${index}] = votes[${index}] + 1 WHERE noteId = '${poll.noteId}'`); + await Polls.query(`UPDATE poll SET votes[${index}] = votes[${index}] + 1 WHERE "noteId" = '${poll.noteId}'`); publishNoteStream(note.id, 'pollVoted', { choice: ps.choice,