diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-02 01:32:25 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-02 01:32:25 -0700 |
commit | 38182ae48f05d0913ada452730a4e564423592a0 (patch) | |
tree | 8765590a44d029b20d2b231b4da3f1056ba244bb /system/admin/handlers.go | |
parent | 0bc6673fd1747eef84124cf7137bfa32c9cb5e6d (diff) |
adding default to order param in postsHandler
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 4 |
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 { |