summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-13 19:08:41 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-13 19:08:41 +0900
commit186d7bbfd9908c8237d3d40ce1863e38aefa9c78 (patch)
treebbdebc84a42dca556c41cdde90912eb795f1d749
parent11.0.0-beta.10 (diff)
downloadsharkey-186d7bbfd9908c8237d3d40ce1863e38aefa9c78.tar.gz
sharkey-186d7bbfd9908c8237d3d40ce1863e38aefa9c78.tar.bz2
sharkey-186d7bbfd9908c8237d3d40ce1863e38aefa9c78.zip
Fix bug
-rw-r--r--src/services/note/polls/vote.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/note/polls/vote.ts b/src/services/note/polls/vote.ts
index 73fc37ff8a..0955e4f80d 100644
--- a/src/services/note/polls/vote.ts
+++ b/src/services/note/polls/vote.ts
@@ -40,7 +40,7 @@ export default async function(user: User, note: Note, choice: number) {
// Increment votes count
const index = 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: choice,