From 8546b69b051d7e53f31922b7e7956b61c0446ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen=20Zhang=20=28=E5=BC=A0=E6=B6=9B=29?= Date: Fri, 2 Feb 2024 13:55:53 +0800 Subject: [PATCH] feat: ignore case of query --- .../src/project/services/get-projects.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/canyon-backend/src/project/services/get-projects.service.ts b/packages/canyon-backend/src/project/services/get-projects.service.ts index 3501adf3..e1cbb1c5 100644 --- a/packages/canyon-backend/src/project/services/get-projects.service.ts +++ b/packages/canyon-backend/src/project/services/get-projects.service.ts @@ -27,12 +27,12 @@ function parseGitLabUrl(gitLabUrl) { export class GetProjectsService { constructor(private readonly prisma: PrismaService) {} async invoke(current, pageSize, keyword, bu) { - const whereCondition = { + const whereCondition: any = { OR: [ // { description: { contains: keyword } }, // { name: { contains: keyword } }, - { pathWithNamespace: { contains: keyword } }, - { id: { contains: keyword } }, + { pathWithNamespace: { contains: keyword, mode: 'insensitive' } }, + { id: { contains: keyword, mode: 'insensitive' } }, ], };