fix(resources): add updateOffice group
This commit is contained in:
parent
bd9cb57825
commit
39b2b27348
@ -94,7 +94,7 @@ export default class OfficesController extends ApiController {
|
|||||||
//init IUser resource with request body values
|
//init IUser resource with request body values
|
||||||
const officeEntity = OfficeResource.hydrate<OfficeResource>(req.body);
|
const officeEntity = OfficeResource.hydrate<OfficeResource>(req.body);
|
||||||
//validate user
|
//validate user
|
||||||
await validateOrReject(officeEntity, { groups: ["update"] });
|
await validateOrReject(officeEntity, { groups: ["updateOffice"] });
|
||||||
//call service to get prisma entity
|
//call service to get prisma entity
|
||||||
const officeEntityUpdated = await this.officesService.update(uid, officeEntity);
|
const officeEntityUpdated = await this.officesService.update(uid, officeEntity);
|
||||||
//Hydrate ressource with prisma entity
|
//Hydrate ressource with prisma entity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user