mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 14:37:17 +03:00
Move shadow ban list to public db
Warning: Migration is not automatic
This commit is contained in:
@@ -29,8 +29,8 @@ async function generateTopUsersStats(sortBy: string, categoryStatsEnabled: boole
|
||||
SUM("votes") as "userVotes", ` +
|
||||
additionalFields +
|
||||
`IFNULL("userNames"."userName", "sponsorTimes"."userID") as "userName" FROM "sponsorTimes" LEFT JOIN "userNames" ON "sponsorTimes"."userID"="userNames"."userID"
|
||||
LEFT JOIN "privateDB"."shadowBannedUsers" ON "sponsorTimes"."userID"="privateDB"."shadowBannedUsers"."userID"
|
||||
WHERE "sponsorTimes"."votes" > -1 AND "sponsorTimes"."shadowHidden" != 1 AND "privateDB"."shadowBannedUsers"."userID" IS NULL
|
||||
LEFT JOIN "shadowBannedUsers" ON "sponsorTimes"."userID"="shadowBannedUsers"."userID"
|
||||
WHERE "sponsorTimes"."votes" > -1 AND "sponsorTimes"."shadowHidden" != 1 AND "shadowBannedUsers"."userID" IS NULL
|
||||
GROUP BY IFNULL("userName", "sponsorTimes"."userID") HAVING "userVotes" > 20
|
||||
ORDER BY "${sortBy}" DESC LIMIT 100`, []);
|
||||
|
||||
@@ -71,10 +71,6 @@ export async function getTopUsers(req: Request, res: Response) {
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO: remove. This is broken for now
|
||||
res.status(200).send();
|
||||
return;
|
||||
|
||||
//setup which sort type to use
|
||||
let sortBy = '';
|
||||
if (sortType == 0) {
|
||||
|
||||
Reference in New Issue
Block a user