From 682cc2b6d9e3524209fbe3d2773fa31e8de9b88d Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 31 Oct 2016 00:40:24 -0700 Subject: fixing args issue and var declaration in handlers --- system/admin/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 997fb9e..742b898 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -860,7 +860,7 @@ func approvePostHandler(res http.ResponseWriter, req *http.Request) { } // Store the content in the bucket t - id, err = db.SetContent(t+":-1", req.Form) + id, err := db.SetContent(t+":-1", req.Form) if err != nil { res.WriteHeader(http.StatusInternalServerError) errView, err := Error500() @@ -875,7 +875,7 @@ func approvePostHandler(res http.ResponseWriter, req *http.Request) { // redirect to the new approved content's editor redir := req.URL.Scheme + req.URL.Host + strings.TrimSuffix(req.URL.Path, "/approve") redir += fmt.Sprintf("?type=%s&id=%d", t, id) - http.Redirect(res, req, http.StatusFound) + http.Redirect(res, req, redir, http.StatusFound) } func editHandler(res http.ResponseWriter, req *http.Request) { -- cgit v1.2.3