Add endpoints for rolling back a workspace to a secret snapshot and rolling back a secret to a version

This commit is contained in:
Tuan Dang
2023-01-07 20:12:53 +07:00
parent 7152e16288
commit 47ab0b4a0f
11 changed files with 432 additions and 74 deletions
+2
View File
@@ -187,6 +187,7 @@ const v1PushSecrets = async ({
}) => {
const newSecret = newSecretsObj[`${type}-${secretKeyHash}`];
return ({
_id: new Types.ObjectId(),
secret: _id,
version: version ? version + 1 : 1,
workspace: new Types.ObjectId(workspaceId),
@@ -258,6 +259,7 @@ const v1PushSecrets = async ({
secretValueTag,
secretValueHash
}) => ({
_id: new Types.ObjectId(),
secret: _id,
version,
workspace,