From 06d1c082fbe6c2f6c997221f2f4e1b49026537e5 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 16 May 2020 00:42:38 -0400 Subject: [PATCH] Fix issues with userID getting in voting --- src/routes/voteOnSponsorTime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/voteOnSponsorTime.js b/src/routes/voteOnSponsorTime.js index 0880959..8a2aff7 100644 --- a/src/routes/voteOnSponsorTime.js +++ b/src/routes/voteOnSponsorTime.js @@ -266,7 +266,7 @@ module.exports = async function voteOnSponsorTime(req, res) { //for each positive vote, see if a hidden submission can be shown again if (incrementAmount > 0 && voteTypeEnum === voteTypes.normal) { //find the UUID that submitted the submission that was voted on - let submissionUserIDInfo = db.prepare("SELECT userID FROM sponsorTimes WHERE UUID = ?").get(UUID).userID; + let submissionUserIDInfo = db.prepare("SELECT userID FROM sponsorTimes WHERE UUID = ?").get(UUID); if (!submissionUserIDInfo) { // They are voting on a non-existent submission res.status("Voting on a non-existent submission").send(400);