From 58c5b463ff75618a557d067c16f49ef581cda85c Mon Sep 17 00:00:00 2001 From: Francisco Lopez Date: Mon, 27 Nov 2017 12:24:33 +0100 Subject: Refactored /projects and /user/:user_id/projects endpoints --- lib/api/projects.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api/projects.rb') 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 -- cgit v1.2.1