Updated insights report rendering.

This commit is contained in:
Mike Cao 2023-08-07 23:02:38 -07:00
parent c4bbcf37b7
commit 85c593416a
6 changed files with 64 additions and 55 deletions

View file

@ -27,7 +27,7 @@ export default async (
const {
websiteId,
dateRange: { startDate, endDate },
groups,
fields,
filters,
} = req.body;
@ -35,7 +35,7 @@ export default async (
return unauthorized(res);
}
const data = await getInsights(websiteId, groups, {
const data = await getInsights(websiteId, fields, {
...filters,
startDate: new Date(startDate),
endDate: new Date(endDate),