From 39b2b27348a64b308ce129d477b55a467760ce03 Mon Sep 17 00:00:00 2001 From: OxSaitama Date: Tue, 25 Jul 2023 15:39:53 +0200 Subject: [PATCH] fix(resources): add updateOffice group --- src/app/api/super-admin/OfficesController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/super-admin/OfficesController.ts b/src/app/api/super-admin/OfficesController.ts index 32f7aa34..e6702675 100644 --- a/src/app/api/super-admin/OfficesController.ts +++ b/src/app/api/super-admin/OfficesController.ts @@ -94,7 +94,7 @@ export default class OfficesController extends ApiController { //init IUser resource with request body values const officeEntity = OfficeResource.hydrate(req.body); //validate user - await validateOrReject(officeEntity, { groups: ["update"] }); + await validateOrReject(officeEntity, { groups: ["updateOffice"] }); //call service to get prisma entity const officeEntityUpdated = await this.officesService.update(uid, officeEntity); //Hydrate ressource with prisma entity