summaryrefslogtreecommitdiff
path: root/lib/api/search.rb
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-02-09 15:38:52 +0100
committerJarka Kadlecová <jarka@gitlab.com>2018-02-09 18:51:06 +0100
commit68ff219c4ec9088005ab872e141912f35ecc59f3 (patch)
tree039c8aef3959ce8c5ab2d7121aec4d3b122f0c95 /lib/api/search.rb
parentfa0923ddfed657223d2e337693f4f2dc74cd7604 (diff)
downloadgitlab-ce-68ff219c4ec9088005ab872e141912f35ecc59f3.tar.gz
API - fix searching in group/project specified by path42937-search-api-fix
Diffstat (limited to 'lib/api/search.rb')
-rw-r--r--lib/api/search.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/search.rb b/lib/api/search.rb
index 9f08fd96a3b..b9982e03bb3 100644
--- a/lib/api/search.rb
+++ b/lib/api/search.rb
@@ -85,9 +85,9 @@ module API
use :pagination
end
get ':id/-/search' do
- find_group!(params[:id])
+ group = find_group!(params[:id])
- present search(group_id: params[:id]), with: entity
+ present search(group_id: group.id), with: entity
end
end
@@ -106,9 +106,9 @@ module API
use :pagination
end
get ':id/-/search' do
- find_project!(params[:id])
+ project = find_project!(params[:id])
- present search(project_id: params[:id]), with: entity
+ present search(project_id: project.id), with: entity
end
end
end