diff options
Diffstat (limited to 'ui/category_list.go')
-rw-r--r-- | ui/category_list.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/category_list.go b/ui/category_list.go index f4a3651..3137b95 100644 --- a/ui/category_list.go +++ b/ui/category_list.go @@ -13,28 +13,27 @@ import ( "miniflux.app/ui/view" ) -// CategoryList shows the page with all categories. -func (c *Controller) CategoryList(w http.ResponseWriter, r *http.Request) { - user, err := c.store.UserByID(request.UserID(r)) +func (h *handler) showCategoryListPage(w http.ResponseWriter, r *http.Request) { + user, err := h.store.UserByID(request.UserID(r)) if err != nil { html.ServerError(w, r, err) return } - categories, err := c.store.CategoriesWithFeedCount(user.ID) + categories, err := h.store.CategoriesWithFeedCount(user.ID) if err != nil { html.ServerError(w, r, err) return } - sess := session.New(c.store, request.SessionID(r)) - view := view.New(c.tpl, r, sess) + sess := session.New(h.store, request.SessionID(r)) + view := view.New(h.tpl, r, sess) view.Set("categories", categories) view.Set("total", len(categories)) view.Set("menu", "categories") view.Set("user", user) - view.Set("countUnread", c.store.CountUnreadEntries(user.ID)) - view.Set("countErrorFeeds", c.store.CountErrorFeeds(user.ID)) + view.Set("countUnread", h.store.CountUnreadEntries(user.ID)) + view.Set("countErrorFeeds", h.store.CountErrorFeeds(user.ID)) html.OK(w, r, view.Render("categories")) } |