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/entry_scraper.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ui/entry_scraper.go') diff --git a/ui/entry_scraper.go b/ui/entry_scraper.go index b4a290f..4c2d58c 100644 --- a/ui/entry_scraper.go +++ b/ui/entry_scraper.go @@ -17,12 +17,7 @@ import ( // FetchContent downloads the original HTML page and returns relevant contents. func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request) { - entryID, err := request.IntParam(r, "entryID") - if err != nil { - json.BadRequest(w, err) - return - } - + entryID := request.RouteInt64Param(r, "entryID") builder := c.store.NewEntryQueryBuilder(request.UserID(r)) builder.WithEntryID(entryID) builder.WithoutStatus(model.EntryStatusRemoved) -- cgit v1.2.3