summaryrefslogtreecommitdiff
path: root/system/api
diff options
context:
space:
mode:
Diffstat (limited to 'system/api')
-rw-r--r--system/api/external.go2
-rw-r--r--system/api/handlers.go4
-rw-r--r--system/api/server.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/system/api/external.go b/system/api/external.go
index 52510c0..2e9597e 100644
--- a/system/api/external.go
+++ b/system/api/external.go
@@ -25,7 +25,7 @@ type Trustable interface {
AutoApprove(req *http.Request) error
}
-func externalPostHandler(res http.ResponseWriter, req *http.Request) {
+func externalContentHandler(res http.ResponseWriter, req *http.Request) {
if req.Method != http.MethodPost {
res.WriteHeader(http.StatusMethodNotAllowed)
return
diff --git a/system/api/handlers.go b/system/api/handlers.go
index 1d7dc8f..f31a1eb 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 == "" {
@@ -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")
diff --git a/system/api/server.go b/system/api/server.go
index 70add10..823ec16 100644
--- a/system/api/server.go
+++ b/system/api/server.go
@@ -8,9 +8,9 @@ import (
func Run() {
http.HandleFunc("/api/types", CORS(Record(typesHandler)))
- http.HandleFunc("/api/contents", CORS(Record(postsHandler)))
+ http.HandleFunc("/api/contents", CORS(Record(contentsHandler)))
- http.HandleFunc("/api/content", CORS(Record(postHandler)))
+ http.HandleFunc("/api/content", CORS(Record(contentHandler)))
- http.HandleFunc("/api/content/external", CORS(Record(externalPostHandler)))
+ http.HandleFunc("/api/content/external", CORS(Record(externalContentHandler)))
}