map secret comments to windmill api description

This commit is contained in:
Sunil Kumar
2023-07-20 12:57:16 +05:30
parent aa019e1501
commit b3baaac5c8
4 changed files with 116 additions and 9 deletions
+25
View File
@@ -5,6 +5,7 @@ import {
getIsWorkspaceE2EEHelper,
getKey,
getSecretsBotHelper,
getSecretsCommentBotHelper,
} from "../helpers/bot";
/**
@@ -107,6 +108,30 @@ class BotService {
tag,
});
}
/**
* Return decreypted secrets comment for workspace with id [worskpaceId] and
* environment [environment] shared to bot.
* @param {Object} obj
* @param {String} obj.workspaceId - id of workspace of secrets
* @param {String} obj.environment - environment for secrets
* @returns {Object} secretObj - object where keys are secret keys and values are comment values
*/
static async getSecretComments({
workspaceId,
environment,
secretPath
}: {
workspaceId: Types.ObjectId;
environment: string;
secretPath: string;
}) {
return await getSecretsCommentBotHelper({
workspaceId,
environment,
secretPath
});
}
}
export default BotService;