Merge pull request #904 from Infisical/dashboard-get-secrets

Rewire dashboard to pull from v3/secrets with folderId support
This commit is contained in:
Maidul Islam
2023-08-29 13:54:37 -04:00
committed by GitHub
5 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -498,6 +498,7 @@ export const getSecretsHelper = async ({
workspaceId,
environment,
authData,
folderId,
secretPath = "/"
}: GetSecretsParams) => {
let secrets: ISecret[] = [];
@@ -507,7 +508,10 @@ export const getSecretsHelper = async ({
throw UnauthorizedRequestError({ message: "Folder Permission Denied" });
}
}
const folderId = await getFolderIdFromServiceToken(workspaceId, environment, secretPath);
if (!folderId) {
folderId = await getFolderIdFromServiceToken(workspaceId, environment, secretPath);
}
// get personal secrets first
secrets = await Secret.find({