diff options
Diffstat (limited to 'lib/api/v3/projects.rb')
-rw-r--r-- | lib/api/v3/projects.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb index 446f804124b..c856ba99f09 100644 --- a/lib/api/v3/projects.rb +++ b/lib/api/v3/projects.rb @@ -173,9 +173,9 @@ module API use :sort_params use :pagination end - get "/search/:query", requirements: { query: /[^\/]+/ } do + get "/search/:query", requirements: { query: %r{[^/]+} } do search_service = Search::GlobalService.new(current_user, search: params[:query]).execute - projects = search_service.objects('projects', params[:page]) + projects = search_service.objects('projects', params[:page], false) projects = projects.reorder(params[:order_by] => params[:sort]) present paginate(projects), with: ::API::V3::Entities::Project |