From 9d64a1c8b63b924fa2e5ef8c033f0e79cc3cc6dd Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sat, 22 Oct 2016 03:28:11 -0700 Subject: debug edit user info handler --- system/admin/handlers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/admin/handlers.go') 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) -- cgit v1.2.3