From af15412954b9b36365f3fd723bf91b3c7c2f88bd Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 4 Jul 2018 17:40:03 -0700 Subject: Add full-text search for entries and add search parameter to the API --- api/entry.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api/entry.go') diff --git a/api/entry.go b/api/entry.go index 6d1167b..a6785fb 100644 --- a/api/entry.go +++ b/api/entry.go @@ -248,4 +248,9 @@ func configureFilters(builder *storage.EntryQueryBuilder, r *http.Request) { if request.HasQueryParam(r, "starred") { builder.WithStarred() } + + searchQuery := request.QueryParam(r, "search", "") + if searchQuery != "" { + builder.WithSearchQuery(searchQuery) + } } -- cgit v1.2.3