Added "columns" to query options. Added events count to event data metrics.

This commit is contained in:
Mike Cao committed 2023-08-07 13:28:32 -07:00
1 parent 9d86385f5c
commit 7da7f58cbe
7 files changed
+45 -65

No files matched your search

+5 -1
View File
@@ -11,6 +11,7 @@ export interface EventDataFieldsRequestBody {
startDate: string;
endDate: string;
};
field?: string;
}
export default async (
@@ -27,7 +28,10 @@ export default async (
return unauthorized(res);
}
const data = await getEventDataFields(websiteId, new Date(+startAt), new Date(+endAt), field);
const startDate = new Date(+startAt);
const endDate = new Date(+endAt);
const data = await getEventDataFields(websiteId, { startDate, endDate, field });
return ok(res, data);
}