diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-22 03:28:11 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-22 03:28:11 -0700 |
commit | 9d64a1c8b63b924fa2e5ef8c033f0e79cc3cc6dd (patch) | |
tree | 69a2a4791831d4255aeef41644597e615a43666d | |
parent | af228ca00a4c816f03c3b46f4cf11f26fe32455e (diff) |
debug edit user info handler
-rw-r--r-- | system/admin/handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 46002d2..5872436 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -275,7 +275,7 @@ func configUsersEditHandler(res http.ResponseWriter, req *http.Request) { password := req.PostFormValue("password") if !user.IsUser(usr, password) { - fmt.Println(err) + fmt.Println("Unexpected user/password combination for", usr.Email) res.WriteHeader(http.StatusBadRequest) errView, err := Error405() if err != nil { @@ -312,7 +312,7 @@ func configUsersEditHandler(res http.ResponseWriter, req *http.Request) { return } - http.Redirect(res, req, req.URL.String(), http.StatusFound) + http.Redirect(res, req, strings.TrimSuffix(req.URL.String(), "/edit"), http.StatusFound) default: res.WriteHeader(http.StatusMethodNotAllowed) @@ -380,7 +380,7 @@ func configUsersDeleteHandler(res http.ResponseWriter, req *http.Request) { return } - http.Redirect(res, req, req.URL.String(), http.StatusFound) + http.Redirect(res, req, strings.TrimSuffix(req.URL.String(), "/delete"), http.StatusFound) default: res.WriteHeader(http.StatusMethodNotAllowed) |