Skip to content

Commit

Permalink
fix api 404 error (#1810)
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <menwe@amazon.com>
(cherry picked from commit 441168e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed May 1, 2024
1 parent 4b5477f commit 963bcce
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions server/routes/data_connections/data_connections_router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,29 @@ export function registerDataConnectionsRoute(router: IRouter, dataSourceEnabled:
}
);

router.get(
{
path: `${DATACONNECTIONS_BASE}`,
validate: false,
},
async (context, request, response): Promise<any> => {
try {
const dataConnectionsresponse = await context.observability_plugin.observabilityClient
.asScoped(request)
.callAsCurrentUser('ppl.getDataConnections');
return response.ok({
body: dataConnectionsresponse,
});
} catch (error: any) {
console.error('Issue in fetching data sources:', error);
return response.custom({
statusCode: error.statusCode || 500,
body: error.response,
});
}
}
);

router.get(
{
path: `${DATACONNECTIONS_BASE}/dataSourceMDSId={dataSourceMDSId?}`,
Expand Down

0 comments on commit 963bcce

Please sign in to comment.