Skip to content

Commit

Permalink
Remove second timeline route
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Sep 17, 2020
1 parent 82a7ede commit 01753c3
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions x-pack/plugins/infra/server/routes/snapshot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,39 +54,4 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => {
}
}
);

framework.registerRoute(
{
method: 'post',
path: '/api/metrics/inventory_timeline',
validate: {
body: escapeHatch,
},
},
async (requestContext, request, response) => {
try {
const snapshotRequest = pipe(
SnapshotRequestRT.decode(request.body),
fold(throwErrors(Boom.badRequest), identity)
);

const source = await libs.sources.getSourceConfiguration(
requestContext.core.savedObjects.client,
snapshotRequest.sourceId
);

UsageCollector.countNode(snapshotRequest.nodeType);
const client = createSearchClient(requestContext, framework);
const snapshotResponse = await getNodes(client, snapshotRequest, source);

return response.ok({
body: SnapshotNodeResponseRT.encode(snapshotResponse),
});
} catch (error) {
return response.internalError({
body: error.message,
});
}
}
);
};

0 comments on commit 01753c3

Please sign in to comment.