diff --git a/src/controllers/work/work-controller.ts b/src/controllers/work/work-controller.ts index bff06fe..547f8a8 100644 --- a/src/controllers/work/work-controller.ts +++ b/src/controllers/work/work-controller.ts @@ -43,12 +43,13 @@ type WorkUpdate = { export class WorkController extends Controller { @Get() async getWork( + @Query() baseOnly?: boolean, @Query() query: string = "", @Query() page: number = 1, @Query() pageSize: number = 30, ) { const where = { - OR: [{ name: { contains: query } }], + OR: [{ name: { contains: query }, serviceId: baseOnly ? null : undefined }], } satisfies Prisma.WorkWhereInput; const [result, total] = await prisma.$transaction([