Rewrite the stop-words endpoint; fix #417

This commit is contained in:
qdequele 2020-01-02 16:30:34 +01:00
parent f0590d3301
commit 91c6539baf
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
6 changed files with 135 additions and 184 deletions

View file

@ -80,16 +80,12 @@ pub fn load_routes(app: &mut tide::App<Data>) {
.get(synonym::get)
.post(synonym::update);
router.at("/stop-words").nest(|router| {
router
.at("/")
.get(stop_words::list)
.patch(stop_words::add)
.post(stop_words::delete);
});
router
.at("/settings")
router.at("/settings").nest(|router| {
router.at("/stop-words")
.get(stop_words::get)
.post(stop_words::update)
.delete(stop_words::delete);
})
.get(setting::get)
.post(setting::update);
});