mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fix search results.
This commit is contained in:
parent
937ff82d9f
commit
cbed961d01
3 changed files with 25 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { useAuth, useCors } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, WebsiteSearchFilterType } from 'lib/types';
|
||||
import { NextApiRequestQueryBody, SearchFilter, WebsiteSearchFilterType } from 'lib/types';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { methodNotAllowed } from 'next-basics';
|
||||
|
||||
|
|
|
|||
|
|
@ -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,7 +57,8 @@ export async function getWebsites(
|
|||
},
|
||||
},
|
||||
}),
|
||||
AND: {
|
||||
AND: [
|
||||
{
|
||||
OR: [
|
||||
{
|
||||
...(userId && {
|
||||
|
|
@ -81,7 +82,8 @@ export async function getWebsites(
|
|||
},
|
||||
],
|
||||
},
|
||||
...(filter && filterQuery),
|
||||
{ ...(filter && filterQuery) },
|
||||
],
|
||||
};
|
||||
|
||||
const [pageFilters, getParameters] = prisma.getPageFilters({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue