Skip to content

Commit

Permalink
remove indexCount route
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Mar 23, 2020
1 parent 24ea40c commit c4569a8
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions x-pack/legacy/plugins/maps/server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,26 +409,6 @@ export function initRoutes(server, licenseUid) {
},
});

server.route({
method: 'GET',
path: `${ROOT}/indexCount`,
handler: async (request, h) => {
const { server, query } = request;

if (!query.index) {
return h.response().code(400);
}

const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');
try {
const { count } = await callWithRequest(request, 'count', { index: query.index });
return { count };
} catch (error) {
return h.response().code(400);
}
},
});

server.route({
method: 'GET',
path: `/${INDEX_SETTINGS_API_PATH}`,
Expand Down

0 comments on commit c4569a8

Please sign in to comment.