From 02153ffb32c178bc23fd38c7da4c474330fbcd9c Mon Sep 17 00:00:00 2001 From: = Date: Thu, 13 Mar 2025 19:41:33 +0530 Subject: [PATCH] fix: resolved create and update failing for service token --- backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts index 8e1de2d91..0abf02aaa 100644 --- a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts +++ b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts @@ -94,7 +94,7 @@ export const fnSecretBulkInsert = async ({ ); const userActorId = actor && actor.type === ActorType.USER ? actor.actorId : undefined; - const identityActorId = actor && actor.type !== ActorType.USER ? actor.actorId : undefined; + const identityActorId = actor && actor.type === ActorType.IDENTITY ? actor.actorId : undefined; const actorType = actor?.type || ActorType.PLATFORM; const newSecrets = await secretDAL.insertMany( @@ -182,7 +182,7 @@ export const fnSecretBulkUpdate = async ({ actor }: TFnSecretBulkUpdate) => { const userActorId = actor && actor?.type === ActorType.USER ? actor?.actorId : undefined; - const identityActorId = actor && actor?.type !== ActorType.USER ? actor?.actorId : undefined; + const identityActorId = actor && actor?.type === ActorType.IDENTITY ? actor?.actorId : undefined; const actorType = actor?.type || ActorType.PLATFORM; const sanitizedInputSecrets = inputSecrets.map(