diff --git a/packages/backend-for-frontend/src/routers/producerKeychainRouter.ts b/packages/backend-for-frontend/src/routers/producerKeychainRouter.ts index ac156d2eaa..3a7565c364 100644 --- a/packages/backend-for-frontend/src/routers/producerKeychainRouter.ts +++ b/packages/backend-for-frontend/src/routers/producerKeychainRouter.ts @@ -36,8 +36,8 @@ const producerKeychainRouter = ( .get("/producerKeychains", async (req, res) => { const ctx = fromBffAppContext(req.ctx, req.headers); try { - const requesterId = ctx.authData.organizationId; - const { limit, offset, userIds, q } = req.query; + const { limit, offset, userIds, q, eserviceId, producerId } = req.query; + const producerKeychains = await producerKeychainService.getProducerKeychains( { @@ -45,7 +45,8 @@ const producerKeychainRouter = ( offset, userIds, name: q, - requesterId, + producerId, + eserviceId, }, ctx ); diff --git a/packages/backend-for-frontend/src/services/producerKeychainService.ts b/packages/backend-for-frontend/src/services/producerKeychainService.ts index 7c79072d94..004c6f20a7 100644 --- a/packages/backend-for-frontend/src/services/producerKeychainService.ts +++ b/packages/backend-for-frontend/src/services/producerKeychainService.ts @@ -26,15 +26,17 @@ export function producerKeychainServiceBuilder( { limit, offset, - requesterId, + producerId, userIds, name, + eserviceId, }: { - requesterId: string; + producerId: string; offset: number; limit: number; userIds: string[]; name?: string; + eserviceId?: string; }, { logger, headers }: WithLogger ): Promise { @@ -46,9 +48,9 @@ export function producerKeychainServiceBuilder( offset, limit, userIds, - producerId: requesterId, + producerId, name, - eserviceId: undefined, + eserviceId, }, headers, });