summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-02 01:32:25 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-02 01:32:25 -0700
commit38182ae48f05d0913ada452730a4e564423592a0 (patch)
tree8765590a44d029b20d2b231b4da3f1056ba244bb
parent0bc6673fd1747eef84124cf7137bfa32c9cb5e6d (diff)
adding default to order param in postsHandler
-rw-r--r--system/admin/handlers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 630796a..e2309aa 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -536,6 +536,10 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
}
order := strings.ToLower(q.Get("order"))
+ if order != "asc" {
+ order = "desc"
+ }
+
status := q.Get("status")
if _, ok := content.Types[t]; !ok {