summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notes
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-10 20:07:36 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-10 20:07:36 +0900
commitc28f4ffb3f5d67125abe3da9af60f05233f663a7 (patch)
tree7a4af744ff75414385bea75f3494cafdacc3680b /src/server/api/endpoints/notes
parentFix bug (diff)
downloadsharkey-c28f4ffb3f5d67125abe3da9af60f05233f663a7.tar.gz
sharkey-c28f4ffb3f5d67125abe3da9af60f05233f663a7.tar.bz2
sharkey-c28f4ffb3f5d67125abe3da9af60f05233f663a7.zip
Clean up
Diffstat (limited to 'src/server/api/endpoints/notes')
-rw-r--r--src/server/api/endpoints/notes/polls/vote.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts
index d868234dc9..dd4d93c7ac 100644
--- a/src/server/api/endpoints/notes/polls/vote.ts
+++ b/src/server/api/endpoints/notes/polls/vote.ts
@@ -123,7 +123,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 id = '${poll.id}'`);
+ await Polls.query(`UPDATE poll SET votes[${index}] = votes[${index}] + 1 WHERE noteId = '${poll.noteId}'`);
publishNoteStream(note.id, 'pollVoted', {
choice: ps.choice,