add ignores for getTotalStats

This commit is contained in:
Michael C
2023-02-21 20:16:25 -05:00
parent 79b7b6ea4c
commit 780555e9df

View File

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