From f71cd57bc7641d3a14be727a4af4ee63a15b3de1 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 24 Jun 2021 01:25:26 -0400 Subject: [PATCH] Fix top users --- src/routes/getTopUsers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/getTopUsers.ts b/src/routes/getTopUsers.ts index 23ff66f..bd65108 100644 --- a/src/routes/getTopUsers.ts +++ b/src/routes/getTopUsers.ts @@ -32,7 +32,7 @@ async function generateTopUsersStats(sortBy: string, categoryStatsEnabled: boole `COALESCE("userNames"."userName", "sponsorTimes"."userID") as "userName" FROM "sponsorTimes" LEFT JOIN "userNames" ON "sponsorTimes"."userID"="userNames"."userID" LEFT JOIN "shadowBannedUsers" ON "sponsorTimes"."userID"="shadowBannedUsers"."userID" WHERE "sponsorTimes"."votes" > -1 AND "sponsorTimes"."shadowHidden" != 1 AND "shadowBannedUsers"."userID" IS NULL - GROUP BY COALESCE("userName", "sponsorTimes"."userID") HAVING "userVotes" > 20 + GROUP BY COALESCE("userName", "sponsorTimes"."userID") HAVING SUM("votes") > 20 ORDER BY "${sortBy}" DESC LIMIT 100`, [maxRewardTimePerSegmentInSeconds, maxRewardTimePerSegmentInSeconds]); for (let i = 0; i < rows.length; i++) {