Only unhide submissions with normal vote

This commit is contained in:
Ajay Ramachandran
2020-04-27 23:02:29 -04:00
parent d767f2ff6b
commit cde51a3059

View File

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