summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-29 14:37:04 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-29 14:37:04 -0700
commit4730ba0b7f465dc001327ba560c058c90812c3c6 (patch)
tree8f680f91ade4526278e44f66851cc92d6205c76d
parented4726b10562102dbe399ed0467c95fc786ff3b0 (diff)
adding defauld status to form map
-rw-r--r--system/admin/handlers.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 55e9e94..96530fd 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -629,14 +629,14 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
if hasExt {
status := q.Get("status")
if status == "" {
- req.Form.Add("status", "public")
+ q.Add("status", "public")
}
- req.Form.Set("status", "public")
- publicURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
+ q.Set("status", "public")
+ publicURL := req.URL.Path + q.Encode()
- req.Form.Set("status", "pending")
- pendingURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
+ q.Set("status", "pending")
+ pendingURL := req.URL.Path + q.Encode()
switch status {
case "public", "":