diff options
Diffstat (limited to 'system/api/server.go')
-rw-r--r-- | system/api/server.go | 12 |
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))) } |