mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 19:15:37 +01:00
Renamed methods. Initial work on realtime dashboard.
This commit is contained in:
parent
b4ea70a67c
commit
e64a555652
16 changed files with 246 additions and 86 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import moment from 'moment-timezone';
|
||||
import { getPageviews } from 'lib/queries';
|
||||
import { getPageviewStats } from 'lib/queries';
|
||||
import { ok, badRequest, methodNotAllowed, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ export default async (req, res) => {
|
|||
}
|
||||
|
||||
const [pageviews, uniques] = await Promise.all([
|
||||
getPageviews(websiteId, startDate, endDate, tz, unit, '*', url),
|
||||
getPageviews(websiteId, startDate, endDate, tz, unit, 'distinct session_id', url),
|
||||
getPageviewStats(websiteId, startDate, endDate, tz, unit, '*', url),
|
||||
getPageviewStats(websiteId, startDate, endDate, tz, unit, 'distinct session_id', url),
|
||||
]);
|
||||
|
||||
return ok(res, { pageviews, uniques });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue