diff options
Diffstat (limited to 'system/api/server.go')
-rw-r--r-- | system/api/server.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/system/api/server.go b/system/api/server.go index 816bc21..bfd8469 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -1,14 +1,18 @@ package api -import "net/http" +import ( + "net/http" + + a "github.com/bosssauce/ponzu/system/api/analytics" +) // Run adds Handlers to default http listener for API func Run() { - http.HandleFunc("/api/types", CORS(typesHandler)) + http.HandleFunc("/api/types", CORS(a.Record(typesHandler))) - http.HandleFunc("/api/posts", CORS(postsHandler)) + http.HandleFunc("/api/posts", CORS(a.Record(postsHandler))) - http.HandleFunc("/api/post", CORS(postHandler)) + http.HandleFunc("/api/post", CORS(a.Record(postHandler))) - http.HandleFunc("/api/external/posts", CORS(externalPostsHandler)) + http.HandleFunc("/api/external/posts", CORS(a.Record(externalPostsHandler))) } |