Removed banned users from total stats.

This commit is contained in:
Ajay Ramachandran
2019-11-21 13:27:09 -05:00
parent aae0a6f9d4
commit 2a25e4a2d9

View File

@@ -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({