Patch integrations Secret querying by workspaceId

This commit is contained in:
Tuan Dang
2023-01-09 17:11:33 +07:00
parent bd5dad71d4
commit d2c77d9985
5 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ const getSecretsHelper = async ({
try {
const key = await getKey({ workspaceId });
const secrets = await Secret.find({
workspaceId,
workspace: workspaceId,
environment,
type: SECRET_SHARED
});
@@ -84,7 +84,7 @@ const getSecretsHelper = async ({
tag: secret.secretKeyTag,
key
});
const secretValue = decryptSymmetric({
ciphertext: secret.secretValueCiphertext,
iv: secret.secretValueIV,
-1
View File
@@ -55,7 +55,6 @@ const validateSecrets = async ({
});
} catch (err) {
console.error(err);
throw new Error('Failed to validate secrets');
}