mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 02:55:38 +01:00
Rename ref to prevent collision with react elements
It seems that, at least in dev mode, 'ref' may incorrectly refer to react elements. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
2b4ddb5388
commit
ecfc7ea68e
6 changed files with 27 additions and 22 deletions
|
|
@ -11,7 +11,7 @@ export default async (req, res) => {
|
|||
return unauthorized(res);
|
||||
}
|
||||
|
||||
const { id, start_at, end_at, unit, tz, url, ref } = req.query;
|
||||
const { id, start_at, end_at, unit, tz, url, referrer } = req.query;
|
||||
|
||||
const websiteId = +id;
|
||||
const startDate = new Date(+start_at);
|
||||
|
|
@ -22,10 +22,10 @@ export default async (req, res) => {
|
|||
}
|
||||
|
||||
const [pageviews, sessions] = await Promise.all([
|
||||
getPageviewStats(websiteId, startDate, endDate, tz, unit, '*', { url, ref }),
|
||||
getPageviewStats(websiteId, startDate, endDate, tz, unit, '*', { url, referrer }),
|
||||
getPageviewStats(websiteId, startDate, endDate, tz, unit, 'distinct session_id', {
|
||||
url,
|
||||
ref,
|
||||
referrer,
|
||||
}),
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue