diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-07-19 19:27:05 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-07-19 19:27:05 -0700 |
commit | 9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b (patch) | |
tree | 59349657a1d5a700abab38332d4e7240533ab4d3 /ui | |
parent | a291d8a38b40569fdd1f00125ca0b29e4b9264f2 (diff) |
Compress JSON, CSS and Javascript responses
Diffstat (limited to 'ui')
-rw-r--r-- | ui/entry_scraper.go | 2 | ||||
-rw-r--r-- | ui/entry_toggle_bookmark.go | 2 | ||||
-rw-r--r-- | ui/entry_update_status.go | 2 | ||||
-rw-r--r-- | ui/static_manifest.go | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/ui/entry_scraper.go b/ui/entry_scraper.go index 75e4040..aea9b20 100644 --- a/ui/entry_scraper.go +++ b/ui/entry_scraper.go @@ -49,5 +49,5 @@ func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request) { entry.Content = sanitizer.Sanitize(entry.URL, content) c.store.UpdateEntryContent(entry) - json.Created(w, map[string]string{"content": entry.Content}) + json.OK(w, r, map[string]string{"content": entry.Content}) } diff --git a/ui/entry_toggle_bookmark.go b/ui/entry_toggle_bookmark.go index 423fde8..9d94cd1 100644 --- a/ui/entry_toggle_bookmark.go +++ b/ui/entry_toggle_bookmark.go @@ -28,5 +28,5 @@ func (c *Controller) ToggleBookmark(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, "OK") + json.OK(w, r, "OK") } diff --git a/ui/entry_update_status.go b/ui/entry_update_status.go index 3174d85..bafa0a0 100644 --- a/ui/entry_update_status.go +++ b/ui/entry_update_status.go @@ -35,5 +35,5 @@ func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request) return } - json.OK(w, "OK") + json.OK(w, r, "OK") } diff --git a/ui/static_manifest.go b/ui/static_manifest.go index 27abaec..96814fe 100644 --- a/ui/static_manifest.go +++ b/ui/static_manifest.go @@ -50,5 +50,5 @@ func (c *Controller) WebManifest(w http.ResponseWriter, r *http.Request) { }, } - json.OK(w, manifest) + json.OK(w, r, manifest) } |