Mercurial > gemma
comparison controllers/routes.go @ 242:24eb518b0394
/users delete should be handled by HTTP DELETE not PUT.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 26 Jul 2018 18:22:40 +0200 |
parents | 9012e4045da4 |
children | deabc2712634 |
comparison
equal
deleted
inserted
replaced
241:3b688fe04c39 | 242:24eb518b0394 |
---|---|
24 Handle: updateUser, | 24 Handle: updateUser, |
25 })).Methods(http.MethodPut) | 25 })).Methods(http.MethodPut) |
26 | 26 |
27 api.Handle("/users/{user}", sysAdmin(&JSONHandler{ | 27 api.Handle("/users/{user}", sysAdmin(&JSONHandler{ |
28 Handle: deleteUser, | 28 Handle: deleteUser, |
29 })).Methods(http.MethodPut) | 29 })).Methods(http.MethodDelete) |
30 | 30 |
31 api.HandleFunc("/login", login). | 31 api.HandleFunc("/login", login). |
32 Methods(http.MethodGet, http.MethodPost) | 32 Methods(http.MethodGet, http.MethodPost) |
33 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). | 33 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). |
34 Methods(http.MethodGet, http.MethodPost) | 34 Methods(http.MethodGet, http.MethodPost) |