From 505f2c7385a8349f1433ca5b57e323fd69aafccb Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 3 Dec 2019 17:02:02 -0500 Subject: [PATCH] Fixed getSavedTimeForUser to ignore low voted or shadow hidden submissions. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 259b425..5753b6a 100644 --- a/index.js +++ b/index.js @@ -577,7 +577,7 @@ app.get('/api/getSavedTimeForUser', function (req, res) { userID = getHash(userID); //up the view count by one - db.prepare("SELECT SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes WHERE userID = ?").get(userID, function(err, row) { + db.prepare("SELECT SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes WHERE userID = ? AND votes > -1 AND shadowHidden != 1 ").get(userID, function(err, row) { if (err) console.log(err); if (row.minutesSaved != null) {