mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user