From 5a69a61d4841a35d7ddcb761a688db8c688314d6 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 11 Nov 2018 11:28:29 -0800 Subject: Move UI middlewares and routes to ui package --- ui/history_flush.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui/history_flush.go') diff --git a/ui/history_flush.go b/ui/history_flush.go index 6c6907b..d0b8f62 100644 --- a/ui/history_flush.go +++ b/ui/history_flush.go @@ -12,13 +12,12 @@ import ( "miniflux.app/http/route" ) -// FlushHistory changes all "read" items to "removed". -func (c *Controller) FlushHistory(w http.ResponseWriter, r *http.Request) { - err := c.store.FlushHistory(request.UserID(r)) +func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) { + err := h.store.FlushHistory(request.UserID(r)) if err != nil { html.ServerError(w, r, err) return } - html.Redirect(w, r, route.Path(c.router, "history")) + html.Redirect(w, r, route.Path(h.router, "history")) } -- cgit v1.2.3