mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 16:26:37 +00:00
fix: update folder deletion logic to use findOne for subfolder lookup
This commit is contained in:
@@ -709,7 +709,7 @@ export const secretFolderServiceFactory = ({
|
|||||||
const dynamicSecret = await dynamicSecretDAL.findOne({ folderId: folderToDelete.id }).catch(() => null);
|
const dynamicSecret = await dynamicSecretDAL.findOne({ folderId: folderToDelete.id }).catch(() => null);
|
||||||
if (dynamicSecret) throw error;
|
if (dynamicSecret) throw error;
|
||||||
|
|
||||||
const subfolder = await folderDAL.findByParentId(folderToDelete.id).catch(() => null);
|
const subfolder = await folderDAL.findOne({ parentId: folderToDelete.id }).catch(() => null);
|
||||||
if (subfolder) throw error;
|
if (subfolder) throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user