Skip to content

Commit

Permalink
nit naming and comment updates
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Feb 28, 2024
1 parent d04e593 commit ceb7524
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
{
Expand Down
6 changes: 3 additions & 3 deletions server/routes/flow_framework_routes_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ceb7524

Please sign in to comment.