diff options
Diffstat (limited to 'ui/category_edit.go')
-rw-r--r-- | ui/category_edit.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/category_edit.go b/ui/category_edit.go index 6651a0a..0ab4b1b 100644 --- a/ui/category_edit.go +++ b/ui/category_edit.go @@ -7,7 +7,6 @@ package ui // import "miniflux.app/ui" import ( "net/http" - "miniflux.app/http/context" "miniflux.app/http/request" "miniflux.app/http/response/html" "miniflux.app/ui/form" @@ -17,11 +16,10 @@ import ( // EditCategory shows the form to modify a category. func (c *Controller) EditCategory(w http.ResponseWriter, r *http.Request) { - ctx := context.New(r) - sess := session.New(c.store, ctx) - view := view.New(c.tpl, ctx, sess) + sess := session.New(c.store, request.SessionID(r)) + view := view.New(c.tpl, r, sess) - user, err := c.store.UserByID(ctx.UserID()) + user, err := c.store.UserByID(request.UserID(r)) if err != nil { html.ServerError(w, err) return @@ -33,7 +31,7 @@ func (c *Controller) EditCategory(w http.ResponseWriter, r *http.Request) { return } - category, err := c.store.Category(ctx.UserID(), categoryID) + category, err := c.store.Category(request.UserID(r), categoryID) if err != nil { html.ServerError(w, err) return |