Move route to clear all synonyms on DELETE /synonyms

This commit is contained in:
Quentin de Quelen 2019-11-20 14:03:55 +01:00
parent ca13900699
commit 5f0f699f37

View File

@ -60,7 +60,7 @@ pub fn load_routes(app: &mut tide::App<Data>) {
}); });
router.at("/synonym").nest(|router| { router.at("/synonym").nest(|router| {
router.at("/").get(synonym::list).post(synonym::create); router.at("/").get(synonym::list).post(synonym::create).delete(synonym::clear);
router router
.at("/:synonym") .at("/:synonym")
@ -69,7 +69,6 @@ pub fn load_routes(app: &mut tide::App<Data>) {
.delete(synonym::delete); .delete(synonym::delete);
router.at("/batch").post(synonym::batch_write); router.at("/batch").post(synonym::batch_write);
router.at("/clear").post(synonym::clear);
}); });
router.at("/stop-words").nest(|router| { router.at("/stop-words").nest(|router| {