From 9d08139f4363d3503398002bc82cb3746e3438cf Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 23 Sep 2018 21:02:26 -0700 Subject: Improve request package and add more unit tests --- ui/category_edit.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ui/category_edit.go') 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) -- cgit v1.2.3