mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 17:30:06 +00:00
fix(folders): fixed algorithm missing in rollback versions and resolved env change reset folderid
This commit is contained in:
@@ -116,7 +116,7 @@ export const updateFolderById = async (req: Request, res: Response) => {
|
||||
await EESecretService.takeSecretSnapshot({
|
||||
workspaceId,
|
||||
environment,
|
||||
folderId: parentFolder.name === "root" ? undefined : parentFolder.id,
|
||||
folderId: parentFolder.id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ export const getSecrets = async (req: Request, res: Response) => {
|
||||
|
||||
const folders = await Folder.findOne({ workspace: workspaceId, environment });
|
||||
if (
|
||||
(!folders && folderId !== "root" && folderId) ||
|
||||
(!folders && folderId && folderId !== "root") ||
|
||||
(!folders && secretPath)
|
||||
) {
|
||||
throw BadRequestError({ message: "Folder not found" });
|
||||
|
||||
Reference in New Issue
Block a user