checkpoint

This commit is contained in:
Brian Cao 2022-07-29 22:30:09 -07:00
parent 3e2c098c05
commit 8f934c7e6c
14 changed files with 73 additions and 63 deletions

View file

@ -14,7 +14,7 @@ export default async (req, res) => {
return unauthorized(res);
}
const { id, start_at, end_at, unit, tz, url, event_type } = req.query;
const { id, start_at, end_at, unit, tz, url, event_name } = req.query;
if (!moment.tz.zone(tz) || !unitTypes.includes(unit)) {
return badRequest(res);
@ -26,7 +26,7 @@ export default async (req, res) => {
const events = await getEventMetrics(websiteId, startDate, endDate, tz, unit, {
url,
event_type,
event_name,
});
return ok(res, events);