mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
More search fixes.
This commit is contained in:
parent
1d15a88370
commit
f48ca7f77a
2 changed files with 4 additions and 4 deletions
|
|
@ -25,11 +25,11 @@ export async function getTeams(
|
|||
filters: PageParams = {},
|
||||
): Promise<PageResult<Team[]>> {
|
||||
const { getSearchParameters } = prisma;
|
||||
const { query } = filters;
|
||||
const { search } = filters;
|
||||
|
||||
const where: Prisma.TeamWhereInput = {
|
||||
...criteria.where,
|
||||
...getSearchParameters(query, [{ name: 'contains' }]),
|
||||
...getSearchParameters(search, [{ name: 'contains' }]),
|
||||
};
|
||||
|
||||
return prisma.pagedQuery<TeamFindManyArgs>(
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ export async function getTeamUsers(
|
|||
criteria: TeamUserFindManyArgs,
|
||||
filters?: PageParams,
|
||||
): Promise<PageResult<TeamUser[]>> {
|
||||
const { query } = filters;
|
||||
const { search } = filters;
|
||||
|
||||
const where: Prisma.TeamUserWhereInput = {
|
||||
...criteria.where,
|
||||
...prisma.getSearchParameters(query, [{ user: { username: 'contains' } }]),
|
||||
...prisma.getSearchParameters(search, [{ user: { username: 'contains' } }]),
|
||||
};
|
||||
|
||||
return prisma.pagedQuery(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue