From 2a25e4a2d9d3a7b9d79cdb1902e4655bef6ce4cb Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 21 Nov 2019 13:27:09 -0500 Subject: [PATCH] Removed banned users from total stats. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 88e7327..ace342d 100644 --- a/index.js +++ b/index.js @@ -651,7 +651,7 @@ app.get('/api/getTopUsers', function (req, res) { //send out totals //send the total submissions, total views and total minutes saved app.get('/api/getTotalStats', function (req, res) { - db.prepare("SELECT COUNT(DISTINCT userID) as userCount, COUNT(*) as totalSubmissions, SUM(views) as viewCount, SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes").get(function(err, row) { + db.prepare("SELECT COUNT(DISTINCT userID) as userCount, COUNT(*) as totalSubmissions, SUM(views) as viewCount, SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes WHERE shadowHidden != 1").get(function(err, row) { if (row != null) { //send this result res.send({