From c536ea64c34f1fcb411318815b40c147c69e49e9 Mon Sep 17 00:00:00 2001 From: qdequele Date: Thu, 2 Jan 2020 17:19:08 +0100 Subject: [PATCH] Change the indexes stats HTTP route; fix #423 --- meilisearch-http/src/routes/mod.rs | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/meilisearch-http/src/routes/mod.rs b/meilisearch-http/src/routes/mod.rs index efd90302a..a0463075a 100644 --- a/meilisearch-http/src/routes/mod.rs +++ b/meilisearch-http/src/routes/mod.rs @@ -77,18 +77,21 @@ pub fn load_routes(app: &mut tide::App) { }); router.at("/settings").nest(|router| { - router.at("/synonyms") - .get(synonym::get) - .post(synonym::update) - .delete(synonym::delete); + router.at("/synonyms") + .get(synonym::get) + .post(synonym::update) + .delete(synonym::delete); - router.at("/stop-words") - .get(stop_words::get) - .post(stop_words::update) - .delete(stop_words::delete); - }) - .get(setting::get) - .post(setting::update); + router.at("/stop-words") + .get(stop_words::get) + .post(stop_words::update) + .delete(stop_words::delete); + }) + .get(setting::get) + .post(setting::update); + + + router.at("/stats").get(stats::index_stat); }); }); @@ -110,7 +113,6 @@ pub fn load_routes(app: &mut tide::App) { .put(health::change_healthyness); router.at("/stats").get(stats::get_stats); - router.at("/stats/:index").get(stats::index_stat); router.at("/version").get(stats::get_version); router.at("/sys-info").get(stats::get_sys_info); router