fix: query when seeing detail of field

This commit is contained in:
Aitor Alonso
2023-07-14 17:37:14 +02:00
parent 8e5da12653
commit 118e1a5b70
3 changed files with 46 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ export default async (
await useAuth(req, res);
if (req.method === 'GET') {
const { websiteId, startAt, endAt, field, withEventNames } = req.query;
const { websiteId, startAt, endAt, field, event, withEventNames } = req.query;
if (!(await canViewWebsite(req.auth, websiteId))) {
return unauthorized(res);
@@ -32,6 +32,7 @@ export default async (
new Date(+startAt),
new Date(+endAt),
field,
event,
withEventNames,
);