mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Refactor of team websites.
This commit is contained in:
parent
2552e1d495
commit
dc3818baaa
22 changed files with 61 additions and 208 deletions
|
|
@ -29,7 +29,7 @@ export async function getReports(
|
|||
params: ReportSearchFilter,
|
||||
options?: { include?: Prisma.ReportInclude },
|
||||
): Promise<FilterResult<Report[]>> {
|
||||
const { query, userId, websiteId, includeTeams } = params;
|
||||
const { query, userId, websiteId } = params;
|
||||
|
||||
const mode = prisma.getQueryMode();
|
||||
|
||||
|
|
@ -42,23 +42,6 @@ export async function getReports(
|
|||
{
|
||||
userId,
|
||||
},
|
||||
{
|
||||
...(includeTeams && {
|
||||
website: {
|
||||
teamWebsite: {
|
||||
some: {
|
||||
team: {
|
||||
teamUser: {
|
||||
some: {
|
||||
userId,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue