summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-05 12:09:37 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-05 12:09:37 -0800
commit24cfc1511d160850a6fc5c93be067c6704892440 (patch)
tree57b0813f0db6d27243af53d2b664b026f3080780
parentf8b0d0f4c2b756b148130c60b868596c7c0cfa67 (diff)
changing Add -> Set for values where it could have been problematic
-rw-r--r--system/admin/handlers.go4
-rw-r--r--system/api/external.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 699e503..6293974 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -871,7 +871,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
</div>`
if hasExt {
if status == "" {
- q.Add("status", "public")
+ q.Set("status", "public")
}
// always start from top of results when changing public/pending
@@ -1355,7 +1355,7 @@ func editHandler(res http.ResponseWriter, req *http.Request) {
}
for name, urlPath := range urlPaths {
- req.PostForm.Add(name, urlPath)
+ req.PostForm.Set(name, urlPath)
}
// check for any multi-value fields (ex. checkbox fields)
diff --git a/system/api/external.go b/system/api/external.go
index 0c2423b..52510c0 100644
--- a/system/api/external.go
+++ b/system/api/external.go
@@ -72,7 +72,7 @@ func externalPostHandler(res http.ResponseWriter, req *http.Request) {
}
for name, urlPath := range urlPaths {
- req.PostForm.Add(name, urlPath)
+ req.PostForm.Set(name, urlPath)
}
// check for any multi-value fields (ex. checkbox fields)