Made filters work for all reports.

This commit is contained in:
Mike Cao 2025-06-29 23:57:11 -07:00
parent ea83afbc13
commit 8b64029409
46 changed files with 328 additions and 275 deletions

View file

@ -14,6 +14,7 @@ export async function POST(request: Request) {
const {
websiteId,
dateRange: { startDate, endDate },
...filters
} = body;
if (!(await canViewWebsite(auth, websiteId))) {
@ -21,6 +22,7 @@ export async function POST(request: Request) {
}
const data = await getUTM(websiteId, {
...filters,
startDate: new Date(startDate),
endDate: new Date(endDate),
});