summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-05-24 22:12:40 +0200
committerToon Claes <toon@gitlab.com>2017-05-30 22:45:59 +0200
commit0f0b9a8466747f69e210fc27778f96ab8ef628bc (patch)
treecfe7bea389ec5f107c4e7261879235c6700baf09 /lib/api/groups.rb
parent01c6323d238706bc8d0acb0273552a094c996ca0 (diff)
downloadgitlab-ce-0f0b9a8466747f69e210fc27778f96ab8ef628bc.tar.gz
Use helper to construct Finder params
The ProjectsFinder and GroupFinder both support the same set of params. And the `/api/v4/projects` and `/api/v4/group/:id/projects` also support the same set of params. But they do not match the Finder params. So use a helper method to transform them.
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index ee85b777aff..aacc3356a0e 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -151,7 +151,7 @@ module API
end
get ":id/projects" do
group = find_group!(params[:id])
- projects = GroupProjectsFinder.new(group: group, current_user: current_user).execute
+ projects = GroupProjectsFinder.new(group: group, current_user: current_user, params: project_finder_params).execute
projects = filter_projects(projects)
entity = params[:simple] ? Entities::BasicProjectDetails : Entities::Project
present paginate(projects), with: entity, current_user: current_user