From cde51a30594e639b67734a3e10555b226e4e38cd Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 27 Apr 2020 23:02:29 -0400 Subject: [PATCH] Only unhide submissions with normal vote --- 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 32ed465..6cffbdf 100644 --- a/src/routes/voteOnSponsorTime.js +++ b/src/routes/voteOnSponsorTime.js @@ -186,7 +186,7 @@ module.exports = async function voteOnSponsorTime(req, res) { db.prepare("UPDATE sponsorTimes SET " + tableName + " += ? WHERE UUID = ?").run(incrementAmount - oldIncrementAmount, UUID); //for each positive vote, see if a hidden submission can be shown again - if (incrementAmount > 0) { + if (incrementAmount > 0 && voteTypeEnum === voteTypes.normal) { //find the UUID that submitted the submission that was voted on let submissionUserID = db.prepare("SELECT userID FROM sponsorTimes WHERE UUID = ?").get(UUID).userID;