mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 02:25:35 +01:00
Fixed summary query.
This commit is contained in:
parent
0c8d9eacd3
commit
344ffeb658
6 changed files with 16 additions and 7 deletions
|
|
@ -11,9 +11,12 @@ export default async (req, res) => {
|
|||
return res.status(400).end();
|
||||
}
|
||||
|
||||
const start = new Date(+start_at);
|
||||
const end = new Date(+end_at);
|
||||
|
||||
const [pageviews, uniques] = await Promise.all([
|
||||
getPageviewData(+id, new Date(+start_at), new Date(+end_at), tz, unit, '*'),
|
||||
getPageviewData(+id, new Date(+start_at), new Date(+end_at), tz, unit, 'distinct session_id'),
|
||||
getPageviewData(+id, start, end, tz, unit, '*'),
|
||||
getPageviewData(+id, start, end, tz, unit, 'distinct session_id'),
|
||||
]);
|
||||
|
||||
return res.status(200).json({ pageviews, uniques });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue