mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
Events chart.
This commit is contained in:
parent
5f47f328be
commit
4618dc7f15
9 changed files with 220 additions and 226 deletions
|
|
@ -11,12 +11,13 @@ export default async (req, res) => {
|
|||
return badRequest(res);
|
||||
}
|
||||
|
||||
const start = new Date(+start_at);
|
||||
const end = new Date(+end_at);
|
||||
const websiteId = +id;
|
||||
const startDate = new Date(+start_at);
|
||||
const endDate = new Date(+end_at);
|
||||
|
||||
const [pageviews, uniques] = await Promise.all([
|
||||
getPageviews(+id, start, end, tz, unit, '*'),
|
||||
getPageviews(+id, start, end, tz, unit, 'distinct session_id'),
|
||||
getPageviews(websiteId, startDate, endDate, tz, unit, '*'),
|
||||
getPageviews(websiteId, startDate, endDate, tz, unit, 'distinct session_id'),
|
||||
]);
|
||||
|
||||
return ok(res, { pageviews, uniques });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue