Fix search results.
This commit is contained in:
@@ -104,7 +104,7 @@ export async function getTeams(
|
||||
...((filterType === TEAM_FILTER_TYPES.all ||
|
||||
filterType === TEAM_FILTER_TYPES['user:username']) && {
|
||||
teamUser: {
|
||||
every: {
|
||||
some: {
|
||||
role: ROLES.teamOwner,
|
||||
user: {
|
||||
username: {
|
||||
|
||||
@@ -57,31 +57,33 @@ export async function getWebsites(
|
||||
},
|
||||
},
|
||||
}),
|
||||
AND: {
|
||||
OR: [
|
||||
{
|
||||
...(userId && {
|
||||
userId,
|
||||
}),
|
||||
},
|
||||
{
|
||||
...(includeTeams && {
|
||||
teamWebsite: {
|
||||
some: {
|
||||
team: {
|
||||
teamUser: {
|
||||
some: {
|
||||
userId,
|
||||
AND: [
|
||||
{
|
||||
OR: [
|
||||
{
|
||||
...(userId && {
|
||||
userId,
|
||||
}),
|
||||
},
|
||||
{
|
||||
...(includeTeams && {
|
||||
teamWebsite: {
|
||||
some: {
|
||||
team: {
|
||||
teamUser: {
|
||||
some: {
|
||||
userId,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
...(filter && filterQuery),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
{ ...(filter && filterQuery) },
|
||||
],
|
||||
};
|
||||
|
||||
const [pageFilters, getParameters] = prisma.getPageFilters({
|
||||
|
||||
Reference in New Issue
Block a user