Mercurial > gemma
comparison controllers/routes.go @ 304:69e291f26bbd
Password reset: Part II.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 01 Aug 2018 13:38:55 +0200 |
parents | 0777aa6de45b |
children | bd292a554b6e |
comparison
equal
deleted
inserted
replaced
302:0777aa6de45b | 304:69e291f26bbd |
---|---|
39 Handle: deleteUser, | 39 Handle: deleteUser, |
40 })).Methods(http.MethodDelete) | 40 })).Methods(http.MethodDelete) |
41 | 41 |
42 api.Handle("/users/passwordreset", &JSONHandler{ | 42 api.Handle("/users/passwordreset", &JSONHandler{ |
43 Input: func() interface{} { return new(PWResetUser) }, | 43 Input: func() interface{} { return new(PWResetUser) }, |
44 Handle: passwordResetRequest, | |
45 }).Methods(http.MethodPost) | |
46 | |
47 api.Handle("/users/passwordreset/{hash}", &JSONHandler{ | |
44 Handle: passwordReset, | 48 Handle: passwordReset, |
45 }).Methods(http.MethodPost) | 49 }).Methods(http.MethodGet) |
46 | 50 |
47 api.HandleFunc("/login", login). | 51 api.HandleFunc("/login", login). |
48 Methods(http.MethodGet, http.MethodPost) | 52 Methods(http.MethodGet, http.MethodPost) |
49 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). | 53 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). |
50 Methods(http.MethodGet, http.MethodPost) | 54 Methods(http.MethodGet, http.MethodPost) |