From 744538eec666962d2f3acddd4c62f35dc66bc770 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 21 Feb 2020 18:45:17 -0500 Subject: [PATCH] Allow duplicate votes --- index.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/index.js b/index.js index 651b666..7a9a1c6 100644 --- a/index.js +++ b/index.js @@ -312,13 +312,6 @@ async function voteOnSponsorTime(req, res) { //check if vote has already happened let votesRow = privateDB.prepare("SELECT type FROM votes WHERE userID = ? AND UUID = ?").get(userID, UUID); - // A downvote is anything below type 0 - if (votesRow !== undefined && (votesRow.type == type || (votesRow.type < 0 && type == 0))) { - //they have already done this exact vote - res.status(405).send("Duplicate Vote"); - return; - } - //-1 for downvote, 1 for upvote. Maybe more depending on reputation in the future let incrementAmount = 0; let oldIncrementAmount = 0;