feat: finished migrator logic

This commit is contained in:
=
2024-07-30 23:19:32 +05:30
parent 6bb41913bf
commit e2caa98c74
5 changed files with 36 additions and 19 deletions
+15 -9
View File
@@ -1935,15 +1935,21 @@ export const secretServiceFactory = ({
offset = 0,
secretId
}: TGetSecretVersionsDTO) => {
const secretVersionV2 = await secretV2BridgeService.getSecretVersions({
actorId,
actor,
actorOrgId,
actorAuthMethod,
limit,
offset,
secretId
});
const secretVersionV2 = await secretV2BridgeService
.getSecretVersions({
actorId,
actor,
actorOrgId,
actorAuthMethod,
limit,
offset,
secretId
})
.catch((err) => {
if ((err as Error).message === "BadRequest: Failed to find secret") {
return null;
}
});
if (secretVersionV2) return secretVersionV2;
const secret = await secretDAL.findById(secretId);