mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 10:19:06 +01:00
Fix bug
This commit is contained in:
parent
11abf93d94
commit
6240f172fe
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user