Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(cherry picked from commit 441168e)

Signed-off-by: Eric <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 9532b7d commit 2fd7ba1
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 2fd7ba1

Please sign in to comment.