Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Lopez <fjlopez@gitlab.com>2017-11-27 14:24:33 +0300
committerFrancisco Lopez <fjlopez@gitlab.com>2017-12-01 20:32:12 +0300
commit58c5b463ff75618a557d067c16f49ef581cda85c (patch)
tree6de7fc1cb446b6120e8eb6c777912904b77efffd /lib/api/projects.rb
parentc85f9c5b1d320f7a6f75e3d08bbafd2fb20d3f58 (diff)
Refactored /projects and /user/:user_id/projects endpoints
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 4cd7e714aa2..12506203429 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -79,9 +79,9 @@ module API
projects = projects.with_statistics if params[:statistics]
projects = projects.with_issues_enabled if params[:with_issues_enabled]
projects = projects.with_merge_requests_enabled if params[:with_merge_requests_enabled]
+ projects = paginate(projects)
if current_user
- projects = projects.includes(:route, :taggings, namespace: :route)
project_members = current_user.project_members
group_members = current_user.group_members
end
@@ -95,7 +95,7 @@ module API
)
options[:with] = Entities::BasicProjectDetails if params[:simple]
- present paginate(projects), options
+ present options[:with].prepare_relation(projects), options
end
end