Should not check updates in cloud mode. Minor updates.

This commit is contained in:
Mike Cao committed 2023-07-28 22:28:06 -07:00
1 parent 8062d7f698
commit 56ab099499
4 files changed
+10 -9

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
import { addMinutes, differenceInMinutes } from 'date-fns';
import { subMinutes, differenceInMinutes } from 'date-fns';
import { NextApiResponse } from 'next';
import { methodNotAllowed, ok, unauthorized } from 'next-basics';
import { canViewWebsite } from 'lib/auth';
@@ -53,8 +53,8 @@ export default async (
const { startDate, endDate } = await parseDateRangeQuery(req);
const diff = differenceInMinutes(endDate, startDate);
const prevStartDate = addMinutes(startDate, -diff);
const prevEndDate = addMinutes(endDate, -diff);
const prevStartDate = subMinutes(startDate, diff);
const prevEndDate = subMinutes(endDate, diff);
const metrics = await getWebsiteStats(websiteId, {
startDate,