diff options
Diffstat (limited to 'ui/category_create.go')
-rw-r--r-- | ui/category_create.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ui/category_create.go b/ui/category_create.go index bd5039f..d8fe2cf 100644 --- a/ui/category_create.go +++ b/ui/category_create.go @@ -13,20 +13,19 @@ import ( "miniflux.app/ui/view" ) -// CreateCategory shows the form to create a new category. -func (c *Controller) CreateCategory(w http.ResponseWriter, r *http.Request) { - user, err := c.store.UserByID(request.UserID(r)) +func (h *handler) showCreateCategoryPage(w http.ResponseWriter, r *http.Request) { + user, err := h.store.UserByID(request.UserID(r)) 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("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("create_category")) } |