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
-6
View File
@@ -28,9 +28,6 @@ export interface ISecretVersion {
createdAt: string; createdAt: string;
folder?: string; folder?: string;
tags?: string[]; tags?: string[];
metadata?: {
[key: string]: string;
}
} }
const secretVersionSchema = new Schema<ISecretVersion>( const secretVersionSchema = new Schema<ISecretVersion>(
@@ -120,9 +117,6 @@ const secretVersionSchema = new Schema<ISecretVersion>(
ref: "Tag", ref: "Tag",
type: [Schema.Types.ObjectId], type: [Schema.Types.ObjectId],
default: [], default: [],
},
metadata: {
type: Schema.Types.Mixed
} }
}, },
{ {
+1 -2
View File
@@ -414,8 +414,7 @@ export const createSecretHelper = async ({
secretValueIV, secretValueIV,
secretValueTag, secretValueTag,
algorithm: ALGORITHM_AES_256_GCM, algorithm: ALGORITHM_AES_256_GCM,
keyEncoding: ENCODING_SCHEME_UTF8, keyEncoding: ENCODING_SCHEME_UTF8
metadata
}); });
// (EE) add version for new secret // (EE) add version for new secret