mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 01:13:48 +01:00
Fix bug
This commit is contained in:
parent
259618253d
commit
c65481d5f4
@ -124,7 +124,7 @@ export default define(meta, async (ps, user) => {
|
|||||||
|
|
||||||
// Increment votes count
|
// Increment votes count
|
||||||
const index = ps.choice + 1; // In SQL, array index is 1 based
|
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', {
|
publishNoteStream(note.id, 'pollVoted', {
|
||||||
choice: ps.choice,
|
choice: ps.choice,
|
||||||
|
Loading…
Reference in New Issue
Block a user