Add unit select and backend implementation. Fix compare for websitestats. Remove unused params from stats, metrics, weekly

This commit is contained in:
Francis Cao 2026-01-23 10:08:47 -08:00
parent 3f173889ea
commit e73432dd26
14 changed files with 139 additions and 57 deletions

View file

@ -31,9 +31,11 @@ export async function GET(
const data = await getWebsiteStats(websiteId, filters);
const compare = filters.compare ?? 'prev';
const { startDate, endDate } = getCompareDate(compare, filters.startDate, filters.endDate);
const { startDate, endDate } = getCompareDate(
filters.compare ?? 'prev',
filters.startDate,
filters.endDate,
);
const comparison = await getWebsiteStats(websiteId, {
...filters,