diff --git a/src/controllers/04-institution-controller.ts b/src/controllers/04-institution-controller.ts index 5e7e604..ab1275b 100644 --- a/src/controllers/04-institution-controller.ts +++ b/src/controllers/04-institution-controller.ts @@ -56,9 +56,25 @@ export class InstitutionController extends Controller { @Query() page: number = 1, @Query() pageSize: number = 30, @Query() group?: string, + ) { + return this.getInstitutionListByCriteria(query, page, pageSize, group); + } + + @Post("list") + @Security("keycloak") + @OperationId("getInstitutionListByCriteria") + async getInstitutionListByCriteria( + @Query() query: string = "", + @Query() page: number = 1, + @Query() pageSize: number = 30, + @Query() group?: string, + @Body() + body?: { + group?: string[]; + }, ) { const where = { - group, + group: body?.group ? { in: body.group } : group, OR: queryOrNot(query, [ { name: { contains: query } }, { code: { contains: query, mode: "insensitive" } },