summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/admin/handlers.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 7fb1692..1e6a26c 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -823,7 +823,14 @@ func contentsHandler(res http.ResponseWriter, req *http.Request) {
Order: order,
}
- total, posts := db.Query(t+"__sorted", opts)
+ var specifier string
+ if status == "public" {
+ specifier = "__sorted"
+ } else if status == "pending" {
+ specifier = "__pending"
+ }
+
+ total, posts := db.Query(t+specifier, opts)
b := &bytes.Buffer{}
html := `<div class="col s9 card">