add folder id to versions in batch update

This commit is contained in:
Maidul Islam
2023-06-06 13:31:08 -07:00
parent 4bf2407d13
commit 77d47e071b
2 changed files with 8 additions and 6 deletions
@@ -218,6 +218,7 @@ export const batchSecrets = async (req: Request, res: Response) => {
algorithm: ALGORITHM_AES_256_GCM, algorithm: ALGORITHM_AES_256_GCM,
keyEncoding: ENCODING_SCHEME_UTF8, keyEncoding: ENCODING_SCHEME_UTF8,
tags: u.tags, tags: u.tags,
folder: u.folder
}) })
); );
@@ -909,13 +910,13 @@ export const updateSecrets = async (req: Request, res: Response) => {
keyEncoding: ENCODING_SCHEME_UTF8, keyEncoding: ENCODING_SCHEME_UTF8,
tags, tags,
...(secretCommentCiphertext !== undefined && ...(secretCommentCiphertext !== undefined &&
secretCommentIV && secretCommentIV &&
secretCommentTag secretCommentTag
? { ? {
secretCommentCiphertext, secretCommentCiphertext,
secretCommentIV, secretCommentIV,
secretCommentTag, secretCommentTag,
} }
: {}), : {}),
}, },
}, },
+1
View File
@@ -43,4 +43,5 @@ export interface BatchSecret {
secretCommentIV: string; secretCommentIV: string;
secretCommentTag: string; secretCommentTag: string;
tags: string[]; tags: string[];
folder: string
} }