Update to insights query.

This commit is contained in:
Mike Cao 2023-08-05 09:09:54 -07:00
parent 91d2b596d6
commit 5e1111db5d
5 changed files with 54 additions and 43 deletions

View file

@ -36,13 +36,15 @@ export default async (
return unauthorized(res);
}
const data = await getInsights(websiteId, {
startDate: new Date(startDate),
endDate: new Date(endDate),
fields,
filters,
const data = await getInsights(
websiteId,
{
...filters,
startDate: new Date(startDate),
endDate: new Date(endDate),
},
groups,
});
);
return ok(res, data);
}