Allow duplicate votes

This commit is contained in:
Ajay Ramachandran
2020-02-21 18:45:17 -05:00
parent dc4c68903f
commit 744538eec6

View File

@@ -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;