chore: eslint max-len

This commit is contained in:
Peter Jaszkowiak
2021-02-04 02:07:29 -07:00
committed by Julian Lam
parent 5c2f0f0557
commit cc9d6fd08b
64 changed files with 459 additions and 137 deletions

View File

@@ -181,12 +181,17 @@ Analytics.getDailyStatsForSet = async function (set, day, numDays) {
const daysArr = [];
day = new Date(day);
day.setDate(day.getDate() + 1); // set the date to tomorrow, because getHourlyStatsForSet steps *backwards* 24 hours to sum up the values
// set the date to tomorrow, because getHourlyStatsForSet steps *backwards* 24 hours to sum up the values
day.setDate(day.getDate() + 1);
day.setHours(0, 0, 0, 0);
while (numDays > 0) {
/* eslint-disable no-await-in-loop */
const dayData = await Analytics.getHourlyStatsForSet(set, day.getTime() - (1000 * 60 * 60 * 24 * (numDays - 1)), 24);
const dayData = await Analytics.getHourlyStatsForSet(
set,
day.getTime() - (1000 * 60 * 60 * 24 * (numDays - 1)),
24
);
daysArr.push(dayData.reduce((cur, next) => cur + next));
numDays -= 1;
}