From 9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 19 Jul 2018 19:27:05 -0700 Subject: Compress JSON, CSS and Javascript responses --- api/entry.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api/entry.go') diff --git a/api/entry.go b/api/entry.go index a6785fb..b2a4d9d 100644 --- a/api/entry.go +++ b/api/entry.go @@ -48,7 +48,7 @@ func (c *Controller) GetFeedEntry(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, entry) + json.OK(w, r, entry) } // GetEntry is the API handler to get a single entry. @@ -73,7 +73,7 @@ func (c *Controller) GetEntry(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, entry) + json.OK(w, r, entry) } // GetFeedEntries is the API handler to get all feed entries. @@ -132,7 +132,7 @@ func (c *Controller) GetFeedEntries(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, &entriesResponse{Total: count, Entries: entries}) + json.OK(w, r, &entriesResponse{Total: count, Entries: entries}) } // GetEntries is the API handler to fetch entries. @@ -184,7 +184,7 @@ func (c *Controller) GetEntries(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, &entriesResponse{Total: count, Entries: entries}) + json.OK(w, r, &entriesResponse{Total: count, Entries: entries}) } // SetEntryStatus is the API handler to change the status of entries. -- cgit v1.2.3