aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/entry_category.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-09-23 21:02:26 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-09-23 21:02:26 -0700
commit9d08139f4363d3503398002bc82cb3746e3438cf (patch)
treeb09c1efb14445624e4a2771bf8cbcf3a9828ecf9 /ui/entry_category.go
parent844680e57328034c20a2d2b84bd315b55fee9e23 (diff)
Improve request package and add more unit tests
Diffstat (limited to 'ui/entry_category.go')
-rw-r--r--ui/entry_category.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/ui/entry_category.go b/ui/entry_category.go
index 795aaf1..283f015 100644
--- a/ui/entry_category.go
+++ b/ui/entry_category.go
@@ -25,17 +25,8 @@ func (c *Controller) ShowCategoryEntry(w http.ResponseWriter, r *http.Request) {
return
}
- categoryID, err := request.IntParam(r, "categoryID")
- if err != nil {
- html.BadRequest(w, err)
- return
- }
-
- entryID, err := request.IntParam(r, "entryID")
- if err != nil {
- html.BadRequest(w, err)
- return
- }
+ categoryID := request.RouteInt64Param(r, "categoryID")
+ entryID := request.RouteInt64Param(r, "entryID")
builder := c.store.NewEntryQueryBuilder(user.ID)
builder.WithCategoryID(categoryID)