mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Add search Mode for mysql.
This commit is contained in:
parent
8f542ed998
commit
203f4e8e03
5 changed files with 32 additions and 11 deletions
|
|
@ -41,6 +41,8 @@ export async function getUsers(
|
|||
options?: { include?: Prisma.UserInclude },
|
||||
): Promise<FilterResult<User[]>> {
|
||||
const { teamId, filter, filterType = USER_FILTER_TYPES.all } = UserSearchFilter;
|
||||
const mode = prisma.getSearchMode();
|
||||
|
||||
const where: Prisma.UserWhereInput = {
|
||||
...(teamId && {
|
||||
teamUser: {
|
||||
|
|
@ -57,7 +59,7 @@ export async function getUsers(
|
|||
filterType === USER_FILTER_TYPES.username) && {
|
||||
username: {
|
||||
startsWith: filter,
|
||||
mode: 'insensitive',
|
||||
...mode,
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue