summaryrefslogtreecommitdiff
path: root/system/api/handlers.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2016-12-06 15:24:36 -0800
committerGitHub <noreply@github.com>2016-12-06 15:24:36 -0800
commitf39c1519ab382a343c05163f00f38c83bff3583d (patch)
tree254f75834f2cb787179f7880b0063e667d8ad234 /system/api/handlers.go
parent5527117e706114c1188afaa10188d96170874047 (diff)
parent64050ef8065bccdef0aab1748040995c637fe9ed (diff)
Merge pull request #19 from bosssauce/ponzu-dev
[core] Added account recovery process and content pagination in admin UI
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r--system/api/handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/api/handlers.go b/system/api/handlers.go
index afe5819..8a1517b 100644
--- a/system/api/handlers.go
+++ b/system/api/handlers.go
@@ -28,7 +28,7 @@ func typesHandler(res http.ResponseWriter, req *http.Request) {
sendData(res, j, http.StatusOK)
}
-func postsHandler(res http.ResponseWriter, req *http.Request) {
+func contentsHandler(res http.ResponseWriter, req *http.Request) {
q := req.URL.Query()
t := q.Get("type")
if t == "" {
@@ -72,7 +72,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
Order: order,
}
- bb := db.Query(t+"_sorted", opts)
+ _, bb := db.Query(t+"__sorted", opts)
var result = []json.RawMessage{}
for i := range bb {
result = append(result, bb[i])
@@ -87,7 +87,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
sendData(res, j, http.StatusOK)
}
-func postHandler(res http.ResponseWriter, req *http.Request) {
+func contentHandler(res http.ResponseWriter, req *http.Request) {
q := req.URL.Query()
id := q.Get("id")
t := q.Get("type")