diff options
author | 2018-11-11 11:28:29 -0800 | |
---|---|---|
committer | 2018-11-11 11:29:12 -0800 | |
commit | 5a69a61d4841a35d7ddcb761a688db8c688314d6 (patch) | |
tree | b807ee1da5b0705e7649f70742d8198f351c1224 /ui/entry_scraper.go | |
parent | 0925899cee9362cf09e982487bd480e2b09041f4 (diff) | |
download | v2-5a69a61d4841a35d7ddcb761a688db8c688314d6.tar.gz v2-5a69a61d4841a35d7ddcb761a688db8c688314d6.tar.zst v2-5a69a61d4841a35d7ddcb761a688db8c688314d6.zip |
Move UI middlewares and routes to ui package
Diffstat (limited to 'ui/entry_scraper.go')
-rw-r--r-- | ui/entry_scraper.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/entry_scraper.go b/ui/entry_scraper.go index c35d9497..519bfd29 100644 --- a/ui/entry_scraper.go +++ b/ui/entry_scraper.go @@ -14,10 +14,9 @@ import ( "miniflux.app/reader/scraper" ) -// FetchContent downloads the original HTML page and returns relevant contents. -func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request) { +func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) { entryID := request.RouteInt64Param(r, "entryID") - builder := c.store.NewEntryQueryBuilder(request.UserID(r)) + builder := h.store.NewEntryQueryBuilder(request.UserID(r)) builder.WithEntryID(entryID) builder.WithoutStatus(model.EntryStatusRemoved) @@ -39,7 +38,7 @@ func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request) { } entry.Content = sanitizer.Sanitize(entry.URL, content) - c.store.UpdateEntryContent(entry) + h.store.UpdateEntryContent(entry) json.OK(w, r, map[string]string{"content": entry.Content}) } |