Skip to content

Commit

Permalink
fix: fix invalid sql query params on duplicate update (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Apr 30, 2024
1 parent d9921a7 commit 909cb9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ async function snapshotCommandHandler(interaction, commandType) {
channelId,
spaceId,
mention || '',
events ? JSON.stringify(events) : '["proposal/start"]',
ts,
events ? JSON.stringify(events) : '["proposal/start"]',
ts
];
await db.queryAsync(
`INSERT INTO subscriptions (guild, channel, space, mention, events, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?)
`INSERT INTO subscriptions (guild, channel, space, mention, updated, events, created) VALUES (?, ?, ?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE guild = ?, channel = ?, space = ?, mention = ?, updated = ?`,
[...subscription, ...subscription]
);
Expand Down

0 comments on commit 909cb9a

Please sign in to comment.