1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Move UI middlewares and routes to ui package

This commit is contained in:
Frédéric Guillot 2018-11-11 11:28:29 -08:00
parent 0925899cee
commit 5a69a61d48
70 changed files with 739 additions and 769 deletions

View file

@ -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})
}