diff options
author | Bruno Melli <gmjskier@gmail.com> | 2016-12-21 05:17:40 +0300 |
---|---|---|
committer | Bruno Melli <gmjskier@gmail.com> | 2017-01-15 09:13:39 +0300 |
commit | 322534aa946970ad0e930defc5576efe744ba6d5 (patch) | |
tree | bd2d8b08374f131652d307d622010b7b229316df /lib | |
parent | 92a91a880327877fe3ac1825a4c5b638333cf586 (diff) |
Add a constraint on the query parameter to allow querying for projects with dots in their name.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 2929d2157dc..ff58c5f17d6 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -153,7 +153,7 @@ module API use :sort_params use :pagination end - get "/search/:query" do + get "/search/:query", requirements: { query: /[^\/]+/ } do search_service = Search::GlobalService.new(current_user, search: params[:query]).execute projects = search_service.objects('projects', params[:page]) projects = projects.reorder(params[:order_by] => params[:sort]) |