Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(folders): changed to secret path in controllers for get by path op

akhilmhdhe74cc471dbcd
diff --git a/backend/src/controllers/v2/secretsController.ts b/backend/src/controllers/v2/secretsController.ts
index 1edb22d729..4da716c35b 100644
--- a/backend/src/controllers/v2/secretsController.ts
+++ b/backend/src/controllers/v2/secretsController.ts
@@ -661,7 +661,7 @@ export const getSecrets = async (req: Request, res: Response) => {
if (folders && secretPath) {
if (!folders) throw BadRequestError({ message: "Folder not found" });
- const folder = getFolderByPath(folders.nodes, folderId as string);
+ const folder = getFolderByPath(folders.nodes, secretPath as string);
if (!folder) {
throw BadRequestError({ message: "Secret path not found" });
}