diff --git a/src/app/api/notary/OfficeFoldersController.ts b/src/app/api/notary/OfficeFoldersController.ts index 5df72822..e6f113a0 100644 --- a/src/app/api/notary/OfficeFoldersController.ts +++ b/src/app/api/notary/OfficeFoldersController.ts @@ -122,11 +122,11 @@ export default class OfficeFoldersController extends ApiController { //init OfficeFolder resource with request body values const officefolderToUpdate = OfficeFolder.hydrate(req.body); - + const officeFolderFoundRessource = OfficeFolder.hydrate(officeFolderFound); //validate folder await validateOrReject(officefolderToUpdate, { groups: ["updateFolder"], forbidUnknownValues: false }); - if ((officeFolderFound as any).folder_anchor?.status === "VERIFIED_ON_CHAIN") { + if (officeFolderFoundRessource.folder_anchor?.status === "VERIFIED_ON_CHAIN") { this.httpBadRequest(response, "Cannot update a verified folder"); return; }