Fetch user count right away

This commit is contained in:
Ajay
2022-06-30 17:56:06 -04:00
parent edff48d258
commit a99da61039

View File

@@ -10,9 +10,10 @@ let firefoxUsersCache = 0;
// By the privacy friendly user counter
let apiUsersCache = 0;
let lastUserCountCheck = 0;
updateExtensionUsers();
export async function getTotalStats(req: Request, res: Response): Promise<void> {
const userCountQuery = `(SELECT COUNT(*) FROM (SELECT DISTINCT "userID" from "sponsorTimes") t) "userCount",`;