Remove metadata from SecretVersion schema

This commit is contained in:
Tuan Dang
2023-08-23 17:47:25 +07:00
parent c342b22d49
commit 2d7c7f075e
2 changed files with 1 additions and 8 deletions

View File

@@ -28,9 +28,6 @@ export interface ISecretVersion {
createdAt: string;
folder?: string;
tags?: string[];
metadata?: {
[key: string]: string;
}
}
const secretVersionSchema = new Schema<ISecretVersion>(
@@ -120,9 +117,6 @@ const secretVersionSchema = new Schema<ISecretVersion>(
ref: "Tag",
type: [Schema.Types.ObjectId],
default: [],
},
metadata: {
type: Schema.Types.Mixed
}
},
{

View File

@@ -414,8 +414,7 @@ export const createSecretHelper = async ({
secretValueIV,
secretValueTag,
algorithm: ALGORITHM_AES_256_GCM,
keyEncoding: ENCODING_SCHEME_UTF8,
metadata
keyEncoding: ENCODING_SCHEME_UTF8
});
// (EE) add version for new secret