mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Don't break for no response
This commit is contained in:
@@ -28,13 +28,16 @@ async function generateTopCategoryUsersStats(sortBy: string, category: string) {
|
||||
GROUP BY COALESCE("userName", "sponsorTimes"."userID") HAVING SUM("votes") > 20
|
||||
ORDER BY "${sortBy}" DESC LIMIT 100`, [maxRewardTimePerSegmentInSeconds, maxRewardTimePerSegmentInSeconds, category]);
|
||||
|
||||
for (const row of rows) {
|
||||
userNames.push(row.userName);
|
||||
viewCounts.push(row.viewCount);
|
||||
totalSubmissions.push(row.totalSubmissions);
|
||||
minutesSaved.push(row.minutesSaved);
|
||||
if (rows) {
|
||||
for (const row of rows) {
|
||||
userNames.push(row.userName);
|
||||
viewCounts.push(row.viewCount);
|
||||
totalSubmissions.push(row.totalSubmissions);
|
||||
minutesSaved.push(row.minutesSaved);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
userNames,
|
||||
viewCounts,
|
||||
|
||||
Reference in New Issue
Block a user