mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Updates to insights, event data, telemetry.
This commit is contained in:
parent
39562d4a64
commit
e4bd314bd6
44 changed files with 413 additions and 278 deletions
|
|
@ -21,20 +21,13 @@ export default async (
|
|||
await useAuth(req, res);
|
||||
|
||||
if (req.method === 'GET') {
|
||||
const { websiteId, startAt, endAt, field, event, withEventNames } = req.query;
|
||||
const { websiteId, startAt, endAt, field } = req.query;
|
||||
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
const data = await getEventDataFields(
|
||||
websiteId,
|
||||
new Date(+startAt),
|
||||
new Date(+endAt),
|
||||
field,
|
||||
event,
|
||||
withEventNames,
|
||||
);
|
||||
const data = await getEventDataFields(websiteId, new Date(+startAt), new Date(+endAt), field);
|
||||
|
||||
return ok(res, data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue