fix: resolved create secret failing for reference

This commit is contained in:
=
2024-05-16 07:35:05 +05:30
parent 58c1d3b0ac
commit 4af703df5b
2 changed files with 6 additions and 3 deletions

View File

@@ -520,7 +520,8 @@ export const fnSecretBulkInsert = async ({
inputSecrets.map(({ references = [], secretBlindIndex }) => ({
secretId: newSecretGroupByBlindIndex[secretBlindIndex as string][0].id,
references
}))
})),
tx
);
if (newSecretTags.length) {
const secTags = await secretTagDAL.saveTagsToSecret(newSecretTags, tx);
@@ -565,7 +566,8 @@ export const fnSecretBulkUpdate = async ({
.map(({ data: { references = [] } }, i) => ({
secretId: newSecrets[i].id,
references
}))
})),
tx
);
const secsUpdatedTag = inputSecrets.flatMap(({ data: { tags } }, i) =>
tags !== undefined ? { tags, secretId: newSecrets[i].id } : []

View File

@@ -1593,7 +1593,8 @@ export const secretServiceFactory = ({
key: botKey
})
)
}))
})),
tx
);
});