mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
fix filter params
This commit is contained in:
parent
95d824542f
commit
7e112b8469
@ -70,7 +70,7 @@ function getFilterQuery(filters = {}, params = []): string {
|
|||||||
|
|
||||||
if (filter !== undefined) {
|
if (filter !== undefined) {
|
||||||
const column = FILTER_COLUMNS[key] || key;
|
const column = FILTER_COLUMNS[key] || key;
|
||||||
arr.push(`and ${column}=$${params.length + 1}`);
|
arr.push(`and ${column}={{${key}}}`);
|
||||||
params.push(decodeURIComponent(filter));
|
params.push(decodeURIComponent(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,11 +47,11 @@ async function relationalQuery(websiteId: string, criteria: GetEventMetricsCrite
|
|||||||
order by 2
|
order by 2
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
...filters,
|
|
||||||
websiteId,
|
websiteId,
|
||||||
startDate: maxDate(startDate, website.resetAt),
|
startDate: maxDate(startDate, website.resetAt),
|
||||||
endDate,
|
endDate,
|
||||||
eventType: EVENT_TYPE.customEvent,
|
eventType: EVENT_TYPE.customEvent,
|
||||||
|
...filters,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ async function relationalQuery(
|
|||||||
startDate: maxDate(startDate, website.resetAt),
|
startDate: maxDate(startDate, website.resetAt),
|
||||||
endDate,
|
endDate,
|
||||||
eventType: column === 'event_name' ? EVENT_TYPE.customEvent : EVENT_TYPE.pageView,
|
eventType: column === 'event_name' ? EVENT_TYPE.customEvent : EVENT_TYPE.pageView,
|
||||||
|
...filters,
|
||||||
};
|
};
|
||||||
|
|
||||||
let excludeDomain = '';
|
let excludeDomain = '';
|
||||||
|
@ -52,11 +52,11 @@ async function relationalQuery(websiteId: string, criteria: PageviewStatsCriteri
|
|||||||
group by 1
|
group by 1
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
...filters,
|
|
||||||
websiteId,
|
websiteId,
|
||||||
startDate: maxDate(startDate, website.resetAt),
|
startDate: maxDate(startDate, website.resetAt),
|
||||||
endDate,
|
endDate,
|
||||||
eventType: EVENT_TYPE.pageView,
|
eventType: EVENT_TYPE.pageView,
|
||||||
|
...filters,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,12 @@ async function relationalQuery(
|
|||||||
group by 1
|
group by 1
|
||||||
order by 2 desc
|
order by 2 desc
|
||||||
limit 100`,
|
limit 100`,
|
||||||
{ ...filters, websiteId, startDate: maxDate(startDate, website.resetAt), endDate },
|
{
|
||||||
|
websiteId,
|
||||||
|
startDate: maxDate(startDate, website.resetAt),
|
||||||
|
endDate,
|
||||||
|
...filters,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ async function relationalQuery(
|
|||||||
) as t
|
) as t
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
...filters,
|
|
||||||
websiteId,
|
websiteId,
|
||||||
startDate: maxDate(startDate, website.resetAt),
|
startDate: maxDate(startDate, website.resetAt),
|
||||||
endDate,
|
endDate,
|
||||||
eventType: EVENT_TYPE.pageView,
|
eventType: EVENT_TYPE.pageView,
|
||||||
|
...filters,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user