mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into feat/um-376-retention-report
This commit is contained in:
commit
fc5a1f458b
23 changed files with 156 additions and 168 deletions
|
|
@ -13,7 +13,7 @@ export interface InsightsRequestBody {
|
|||
};
|
||||
fields: { name: string; type: string; value: string }[];
|
||||
filters: string[];
|
||||
groups: string[];
|
||||
groups: { name: string; type: string }[];
|
||||
}
|
||||
|
||||
export default async (
|
||||
|
|
@ -27,21 +27,18 @@ export default async (
|
|||
const {
|
||||
websiteId,
|
||||
dateRange: { startDate, endDate },
|
||||
fields,
|
||||
filters,
|
||||
groups,
|
||||
filters,
|
||||
} = req.body;
|
||||
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
const data = await getInsights(websiteId, {
|
||||
const data = await getInsights(websiteId, groups, {
|
||||
...filters,
|
||||
startDate: new Date(startDate),
|
||||
endDate: new Date(endDate),
|
||||
fields,
|
||||
filters,
|
||||
groups,
|
||||
});
|
||||
|
||||
return ok(res, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue