summaryrefslogtreecommitdiff
path: root/system/api/server.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2016-11-02 02:27:29 -0700
committerGitHub <noreply@github.com>2016-11-02 02:27:29 -0700
commitbd27ac1f0dbff856ca3e96d1df636f3b02d61522 (patch)
treebe9b5b86b7da34a150e228a817335d368b8705ca /system/api/server.go
parentac647e2f77d05cc015a369832c2d428ec1cd6567 (diff)
parent759506ca799c443402fed9c6413a8b49406e197f (diff)
Merge pull request #12 from bosssauce/ponzu-dev
[core] More efficient DB queries
Diffstat (limited to 'system/api/server.go')
-rw-r--r--system/api/server.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/system/api/server.go b/system/api/server.go
index 816bc21..4468394 100644
--- a/system/api/server.go
+++ b/system/api/server.go
@@ -1,14 +1,16 @@
package api
-import "net/http"
+import (
+ "net/http"
+)
// Run adds Handlers to default http listener for API
func Run() {
- http.HandleFunc("/api/types", CORS(typesHandler))
+ http.HandleFunc("/api/types", CORS(Record(typesHandler)))
- http.HandleFunc("/api/posts", CORS(postsHandler))
+ http.HandleFunc("/api/posts", CORS(Record(postsHandler)))
- http.HandleFunc("/api/post", CORS(postHandler))
+ http.HandleFunc("/api/post", CORS(Record(postHandler)))
- http.HandleFunc("/api/external/posts", CORS(externalPostsHandler))
+ http.HandleFunc("/api/external/posts", CORS(Record(externalPostsHandler)))
}