feat: created base for secret v2 bridge and plugged it to secret-router

This commit is contained in:
=
2024-07-30 23:03:56 +05:30
parent 761a0f121c
commit b563c4030b
14 changed files with 3001 additions and 27 deletions
+2 -2
View File
@@ -689,7 +689,7 @@ export const createManySecretsRawFnFactory = ({
secrets,
userId
}: TCreateManySecretsRawFn) => {
const botKey = await getBotKeyFn(projectId);
const { botKey } = await getBotKeyFn(projectId);
if (!botKey) throw new BadRequestError({ message: "Project bot not found", name: "bot_not_found_error" });
await projectDAL.checkProjectUpgradeStatus(projectId);
@@ -787,7 +787,7 @@ export const updateManySecretsRawFnFactory = ({
secrets, // consider accepting instead ciphertext secrets
userId
}: TUpdateManySecretsRawFn): Promise<Array<TSecrets & { _id: string }>> => {
const botKey = await getBotKeyFn(projectId);
const { botKey } = await getBotKeyFn(projectId);
if (!botKey) throw new BadRequestError({ message: "Project bot not found", name: "bot_not_found_error" });
await projectDAL.checkProjectUpgradeStatus(projectId);