From 52a7d7e79167f72c3c88fc3f03703246855426c6 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Oct 2022 23:08:16 -0400 Subject: [PATCH] allow locked to be in top list and chapter --- src/routes/getTopCategoryUsers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/getTopCategoryUsers.ts b/src/routes/getTopCategoryUsers.ts index 1197e6a..c368519 100644 --- a/src/routes/getTopCategoryUsers.ts +++ b/src/routes/getTopCategoryUsers.ts @@ -26,7 +26,7 @@ async function generateTopCategoryUsersStats(sortBy: string, category: string) { SUM("votes") as "userVotes", 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"."category" = ? AND "sponsorTimes"."votes" > -1 AND "sponsorTimes"."shadowHidden" != 1 AND "shadowBannedUsers"."userID" IS NULL - GROUP BY COALESCE("userName", "sponsorTimes"."userID") HAVING SUM("votes") > 20 + GROUP BY COALESCE("userName", "sponsorTimes"."userID") HAVING SUM("votes") > 20 OR SUM("locked") > 0 OR "category" = 'chapter' ORDER BY "${sortBy}" DESC LIMIT 100`, [maxRewardTimePerSegmentInSeconds, maxRewardTimePerSegmentInSeconds, category]); if (rows) {