From ceb7524a3fd68137f778092ef2ff2bccac947534 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Wed, 28 Feb 2024 12:56:22 -0800 Subject: [PATCH] nit naming and comment updates Signed-off-by: Tyler Ohlsen --- server/plugin.ts | 4 ++-- server/routes/flow_framework_routes_service.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/plugin.ts b/server/plugin.ts index 5c253614..2772d5aa 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -43,10 +43,10 @@ export class FlowFrameworkDashboardsPlugin this.logger.debug('flow-framework-dashboards: Setup'); const router = core.http.createRouter(); - // Get any custom/overridden headers + // Get global config const globalConfig = await this.globalConfig$.pipe(first()).toPromise(); - // Create OpenSearch client w/ relevant plugins and headers + // Create OpenSearch client, including flow framework plugin APIs const client: ILegacyClusterClient = core.opensearch.legacy.createClient( 'flow_framework', { diff --git a/server/routes/flow_framework_routes_service.ts b/server/routes/flow_framework_routes_service.ts index ece8fc3e..be98978b 100644 --- a/server/routes/flow_framework_routes_service.ts +++ b/server/routes/flow_framework_routes_service.ts @@ -123,12 +123,12 @@ export class FlowFrameworkRoutesService { .asScoped(req) .callAsCurrentUser('flowFramework.searchWorkflows', { body }); const workflowHits = response.hits.hits as any[]; - const workflowsMap = {} as WorkflowDict; + const workflowDict = {} as WorkflowDict; workflowHits.forEach((workflowHit: any) => { - workflowsMap[workflowHit._id] = toWorkflowObj(workflowHit); + workflowDict[workflowHit._id] = toWorkflowObj(workflowHit); }); - return res.ok({ body: { workflows: workflowsMap } }); + return res.ok({ body: { workflows: workflowDict } }); } catch (err: any) { return generateCustomError(res, err); }