Skip to content
Snippets Groups Projects
Unverified Commit 186d7bbf authored by syuilo's avatar syuilo
Browse files

Fix bug

parent 60a11f8d
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment