summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-13 17:24:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-13 17:24:56 +0900
commit69662e24c3ab135e3618d1a28c7914efdff66f24 (patch)
treedef39a1e53b97f527a99b25060e25ce7d2eb3b5c /src/server/api
parent11.0.0-beta.8 (diff)
downloadsharkey-69662e24c3ab135e3618d1a28c7914efdff66f24.tar.gz
sharkey-69662e24c3ab135e3618d1a28c7914efdff66f24.tar.bz2
sharkey-69662e24c3ab135e3618d1a28c7914efdff66f24.zip
Fix bug
Diffstat (limited to 'src/server/api')
-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 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,