🐛 Removing any type

This commit is contained in:
Maxime Lalo 2023-10-04 17:47:05 +02:00
parent 2e47e7a820
commit 46cc08eeca

View File

@ -122,11 +122,11 @@ export default class OfficeFoldersController extends ApiController {
//init OfficeFolder resource with request body values
const officefolderToUpdate = OfficeFolder.hydrate<OfficeFolder>(req.body);
const officeFolderFoundRessource = OfficeFolder.hydrate<OfficeFolder>(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;
}