mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-09-20 04:54:00 +02:00
add ignores for getTotalStats
This commit is contained in:
parent
79b7b6ea4c
commit
780555e9df
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,7 @@ export async function getTotalStats(req: Request, res: Response): Promise<void>
|
|||
const row = await getStats(countContributingUsers);
|
||||
lastFetch = row;
|
||||
|
||||
/* istanbul ignore if */
|
||||
if (!row) res.sendStatus(500);
|
||||
const extensionUsers = chromeUsersCache + firefoxUsersCache;
|
||||
|
||||
|
@ -68,6 +69,7 @@ function getStats(countContributingUsers: boolean): Promise<DBStatsData> {
|
|||
}
|
||||
|
||||
function updateExtensionUsers() {
|
||||
/* istanbul ignore else */
|
||||
if (config.userCounterURL) {
|
||||
axios.get(`${config.userCounterURL}/api/v1/userCount`)
|
||||
.then(res => apiUsersCache = Math.max(apiUsersCache, res.data.userCount))
|
||||
|
|
Loading…
Reference in a new issue