mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
add ignores for getTotalStats
This commit is contained in:
@@ -34,6 +34,7 @@ export async function getTotalStats(req: Request, res: Response): Promise<void>
|
|||||||
const row = await getStats(countContributingUsers);
|
const row = await getStats(countContributingUsers);
|
||||||
lastFetch = row;
|
lastFetch = row;
|
||||||
|
|
||||||
|
/* istanbul ignore if */
|
||||||
if (!row) res.sendStatus(500);
|
if (!row) res.sendStatus(500);
|
||||||
const extensionUsers = chromeUsersCache + firefoxUsersCache;
|
const extensionUsers = chromeUsersCache + firefoxUsersCache;
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ function getStats(countContributingUsers: boolean): Promise<DBStatsData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateExtensionUsers() {
|
function updateExtensionUsers() {
|
||||||
|
/* istanbul ignore else */
|
||||||
if (config.userCounterURL) {
|
if (config.userCounterURL) {
|
||||||
axios.get(`${config.userCounterURL}/api/v1/userCount`)
|
axios.get(`${config.userCounterURL}/api/v1/userCount`)
|
||||||
.then(res => apiUsersCache = Math.max(apiUsersCache, res.data.userCount))
|
.then(res => apiUsersCache = Math.max(apiUsersCache, res.data.userCount))
|
||||||
|
|||||||
Reference in New Issue
Block a user