diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-09-23 21:02:26 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-09-23 21:02:26 -0700 |
commit | 9d08139f4363d3503398002bc82cb3746e3438cf (patch) | |
tree | b09c1efb14445624e4a2771bf8cbcf3a9828ecf9 /ui/category_edit.go | |
parent | 844680e57328034c20a2d2b84bd315b55fee9e23 (diff) |
Improve request package and add more unit tests
Diffstat (limited to 'ui/category_edit.go')
-rw-r--r-- | ui/category_edit.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/ui/category_edit.go b/ui/category_edit.go index 0ab4b1b..b99d2a0 100644 --- a/ui/category_edit.go +++ b/ui/category_edit.go @@ -25,12 +25,7 @@ func (c *Controller) EditCategory(w http.ResponseWriter, r *http.Request) { return } - categoryID, err := request.IntParam(r, "categoryID") - if err != nil { - html.BadRequest(w, err) - return - } - + categoryID := request.RouteInt64Param(r, "categoryID") category, err := c.store.Category(request.UserID(r), categoryID) if err != nil { html.ServerError(w, err) |