From 7adf1979d9c958ac56e272b20847175f64855fba 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] manual backport for bug fix Signed-off-by: Riya Saxena --- public/services/FindingsService.ts | 4 ++-- server/routes/FindingsRoutes.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/services/FindingsService.ts b/public/services/FindingsService.ts index 30674500..4bb671c0 100644 --- a/public/services/FindingsService.ts +++ b/public/services/FindingsService.ts @@ -19,8 +19,8 @@ export default class FindingsService { getFindings = async ( detectorParams: GetFindingsParams ): Promise> => { - const findingIds = detectorParams.findingIds - ? JSON.stringify(detectorParams.findingIds) + const findingIds = getFindingsParams.findingIds + ? getFindingsParams.findingIds.join(',') : undefined; const query = { sortOrder: 'desc', diff --git a/server/routes/FindingsRoutes.ts b/server/routes/FindingsRoutes.ts index 0bb659a4..d5ddf1f8 100644 --- a/server/routes/FindingsRoutes.ts +++ b/server/routes/FindingsRoutes.ts @@ -25,7 +25,9 @@ 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()), + startTime: schema.maybe(schema.number()), + endTime: schema.maybe(schema.number()) }), }, },