diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-02-09 01:11:22 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-02-09 01:11:22 -0800 |
commit | 7fe98041a3561f2cf92c13fb8f2cb2b7afbc2e5b (patch) | |
tree | 3e798b02ea23e7fe890324e4b0f86a721ecd0c77 /system/admin/handlers.go | |
parent | f740d2bd9b83e36137743346347b6a4a9f35c3a6 (diff) |
fixing overridden variable from request form value change
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index c5b3058..4bb5521 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -1306,6 +1306,8 @@ func approveContentHandler(res http.ResponseWriter, req *http.Request) { return } + pendingID := req.FormValue("id") + t := req.FormValue("type") if strings.Contains(t, "__") { t = strings.Split(t, "__")[0] @@ -1406,9 +1408,8 @@ func approveContentHandler(res http.ResponseWriter, req *http.Request) { return } - pendID := req.FormValue("id") - if pendID != "" { - err = db.DeleteContent(req.FormValue("type")+":"+pendID, req.Form) + if pendingID != "" { + err = db.DeleteContent(req.FormValue("type")+":"+pendingID, req.Form) if err != nil { log.Println("Failed to remove content after approval:", err) } |