mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 14:07:09 +03:00
Allow duplicate votes
This commit is contained in:
7
index.js
7
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;
|
||||
|
||||
Reference in New Issue
Block a user