diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-10 11:41:22 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-10 11:41:22 -0800 |
commit | a9d3645302c8129c3300959f024fa28972208e50 (patch) | |
tree | cac49fae21e8ec23dc41496f9b186280824e74f7 /system/admin/handlers.go | |
parent | c19a252008d2e198b346229d0f54f31115132d7d (diff) |
adding correct error views, normalize action value for comparison;
Diffstat (limited to 'system/admin/handlers.go')
-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 cccfa54..1edbb4d 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -2026,7 +2026,7 @@ func addonsHandler(res http.ResponseWriter, req *http.Request) { } id := req.PostFormValue("id") - action := req.PostFormValue("action") + action := strings.ToLower(req.PostFormValue("action")) _, err = db.Addon(id) if err == db.ErrNoAddonExists { @@ -2081,7 +2081,7 @@ func addonsHandler(res http.ResponseWriter, req *http.Request) { } default: res.WriteHeader(http.StatusBadRequest) - errView, err := Error405() + errView, err := Error400() if err != nil { return } @@ -2092,7 +2092,7 @@ func addonsHandler(res http.ResponseWriter, req *http.Request) { default: res.WriteHeader(http.StatusBadRequest) - errView, err := Error405() + errView, err := Error400() if err != nil { log.Println(err) return |