aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/entry_search.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/entry_search.go')
-rw-r--r--ui/entry_search.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/ui/entry_search.go b/ui/entry_search.go
index 15babc1..8acf103 100644
--- a/ui/entry_search.go
+++ b/ui/entry_search.go
@@ -25,13 +25,8 @@ func (c *Controller) ShowSearchEntry(w http.ResponseWriter, r *http.Request) {
return
}
- entryID, err := request.IntParam(r, "entryID")
- if err != nil {
- html.BadRequest(w, err)
- return
- }
-
- searchQuery := request.QueryParam(r, "q", "")
+ entryID := request.RouteInt64Param(r, "entryID")
+ searchQuery := request.QueryStringParam(r, "q", "")
builder := c.store.NewEntryQueryBuilder(user.ID)
builder.WithSearchQuery(searchQuery)
builder.WithEntryID(entryID)