mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 21:47:02 +03:00
Fetch user count right away
This commit is contained in:
@@ -10,9 +10,10 @@ let firefoxUsersCache = 0;
|
|||||||
|
|
||||||
// By the privacy friendly user counter
|
// By the privacy friendly user counter
|
||||||
let apiUsersCache = 0;
|
let apiUsersCache = 0;
|
||||||
|
|
||||||
let lastUserCountCheck = 0;
|
let lastUserCountCheck = 0;
|
||||||
|
|
||||||
|
updateExtensionUsers();
|
||||||
|
|
||||||
export async function getTotalStats(req: Request, res: Response): Promise<void> {
|
export async function getTotalStats(req: Request, res: Response): Promise<void> {
|
||||||
const userCountQuery = `(SELECT COUNT(*) FROM (SELECT DISTINCT "userID" from "sponsorTimes") t) "userCount",`;
|
const userCountQuery = `(SELECT COUNT(*) FROM (SELECT DISTINCT "userID" from "sponsorTimes") t) "userCount",`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user