From 46cc08eecae69ff101b4b58a06e0b8cc5801e918 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Wed, 4 Oct 2023 17:47:05 +0200 Subject: [PATCH] :bug: Removing any type --- src/app/api/notary/OfficeFoldersController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }