mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Updated polling logic.
This commit is contained in:
parent
fdc92d087b
commit
9737127bb1
6 changed files with 33 additions and 19 deletions
|
|
@ -16,7 +16,7 @@ export default async (req, res) => {
|
|||
}
|
||||
|
||||
if (req.method === 'GET') {
|
||||
const { type } = req.query;
|
||||
const { type, start_at } = req.query;
|
||||
const { user_id } = req.auth;
|
||||
|
||||
if (type === 'init') {
|
||||
|
|
@ -37,7 +37,7 @@ export default async (req, res) => {
|
|||
|
||||
const { websites } = await parseToken(token);
|
||||
|
||||
const [pageviews, sessions, events] = await getData(websites, new Date());
|
||||
const [pageviews, sessions, events] = await getData(websites, new Date(+start_at));
|
||||
|
||||
return ok(res, { pageviews, sessions, events });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue