From 654b43541fa8e70795da1e9b80771d969254e53e Mon Sep 17 00:00:00 2001 From: Riya <69919272+riysaxen-amzn@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:17:18 -0700 Subject: [PATCH] bug fix getFindingByIds API (#1051) Signed-off-by: Riya Saxena (cherry picked from commit 4cb6965332b5ed17be9d60ba4fc5bb54de8e9cfe) --- public/services/FindingsService.ts | 2 +- server/routes/FindingsRoutes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/services/FindingsService.ts b/public/services/FindingsService.ts index 1bbb2a1ed..b22c8e6fd 100644 --- a/public/services/FindingsService.ts +++ b/public/services/FindingsService.ts @@ -19,7 +19,7 @@ export default class FindingsService { detectorParams: GetFindingsParams ): Promise> => { const findingIds = detectorParams.findingIds - ? JSON.stringify(detectorParams.findingIds) + ? detectorsParams.findingIds.join(',') : undefined; const query: GetFindingsParams | {} = { sortOrder: 'desc', diff --git a/server/routes/FindingsRoutes.ts b/server/routes/FindingsRoutes.ts index 89a1c4da9..ea7636eda 100644 --- a/server/routes/FindingsRoutes.ts +++ b/server/routes/FindingsRoutes.ts @@ -24,7 +24,7 @@ export function setupFindingsRoutes(services: NodeServices, router: IRouter) { detectionType: schema.maybe(schema.string()), severity: schema.maybe(schema.string()), searchString: schema.maybe(schema.string()), - findingIds: schema.maybe(schema.arrayOf(schema.string())), + findingIds: schema.maybe(schema.string()), }), }, },