summaryrefslogtreecommitdiff
path: root/system/api/server.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-11 19:58:47 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-11 19:58:47 -0800
commit7e06c63410304767bc6b0dce4e1e2477934fd816 (patch)
treef1cb93a2c2b75202d2f55377eac54355002a09fd /system/api/server.go
parenta20025b452934069fc6c39949d7b9e123a503c9c (diff)
returning api server middleware to original state and adding req header lookup for cache implementation
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 f8c9ba9..823ec16 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", Record((CORS(typesHandler))))
+ http.HandleFunc("/api/types", CORS(Record(typesHandler)))
- http.HandleFunc("/api/contents", Record((CORS(contentsHandler))))
+ http.HandleFunc("/api/contents", CORS(Record(contentsHandler)))
- http.HandleFunc("/api/content", Record((CORS(contentHandler))))
+ http.HandleFunc("/api/content", CORS(Record(contentHandler)))
- http.HandleFunc("/api/content/external", Record((CORS(externalContentHandler))))
+ http.HandleFunc("/api/content/external", CORS(Record(externalContentHandler)))
}