From c99dcd123e886e7c62c913074c5c04ae3acc3272 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 6 Dec 2016 18:17:24 -0800 Subject: re-order middleware so Record is called even if cache is active --- system/api/server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/api') diff --git a/system/api/server.go b/system/api/server.go index 41d652a..703a906 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -8,11 +8,11 @@ import ( // Run adds Handlers to default http listener for API func Run() { - http.HandleFunc("/api/types", db.CacheControl(CORS(Record(typesHandler)))) + http.HandleFunc("/api/types", Record(db.CacheControl(CORS(typesHandler)))) - http.HandleFunc("/api/contents", db.CacheControl(CORS(Record(contentsHandler)))) + http.HandleFunc("/api/contents", Record(db.CacheControl(CORS(contentsHandler)))) - http.HandleFunc("/api/content", db.CacheControl(CORS(Record(contentHandler)))) + http.HandleFunc("/api/content", Record(db.CacheControl(CORS(contentHandler)))) - http.HandleFunc("/api/content/external", db.CacheControl(CORS(Record(externalContentHandler)))) + http.HandleFunc("/api/content/external", Record(db.CacheControl(CORS(externalContentHandler)))) } -- cgit v1.2.3