add ignores for getTotalStats

This commit is contained in:
Michael C 2023-02-21 20:16:25 -05:00
parent 79b7b6ea4c
commit 780555e9df
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4

View file

@ -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))