mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Updated query filters. Updated packages.
This commit is contained in:
parent
6bb34cd3a5
commit
11d8b19279
7 changed files with 35 additions and 17 deletions
|
|
@ -21,7 +21,7 @@ export default async (req, res) => {
|
|||
const startDate = new Date(+start_at);
|
||||
const endDate = new Date(+end_at);
|
||||
|
||||
const events = await getEvents(websiteId, startDate, endDate, tz, unit, url);
|
||||
const events = await getEvents(websiteId, startDate, endDate, tz, unit, { url });
|
||||
|
||||
return ok(res, events);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export default async (req, res) => {
|
|||
const startDate = new Date(+start_at);
|
||||
const endDate = new Date(+end_at);
|
||||
|
||||
const metrics = await getMetrics(websiteId, startDate, endDate, url);
|
||||
const metrics = await getMetrics(websiteId, startDate, endDate, { url });
|
||||
|
||||
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
|
||||
obj[key] = Number(metrics[0][key]) || 0;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default async (req, res) => {
|
|||
const endDate = new Date(+end_at);
|
||||
|
||||
if (sessionColumns.includes(type)) {
|
||||
const data = await getSessionMetrics(websiteId, startDate, endDate, type, url);
|
||||
const data = await getSessionMetrics(websiteId, startDate, endDate, type, { url });
|
||||
|
||||
return ok(res, data);
|
||||
}
|
||||
|
|
@ -54,8 +54,10 @@ export default async (req, res) => {
|
|||
endDate,
|
||||
getColumn(type),
|
||||
getTable(type),
|
||||
domain,
|
||||
type !== 'url' ? url : undefined,
|
||||
{
|
||||
domain,
|
||||
url: type !== 'url' && url,
|
||||
},
|
||||
);
|
||||
|
||||
return ok(res, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue