diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-08 17:24:20 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:51 +0900 |
commit | 56f50cbb3a63ae914f50eda3756b49d5cf516207 (patch) | |
tree | 10b957c6b3f5aa2fea50696f3ebc038de6ac5ba0 /lib | |
parent | 44ae99399f75f0b23e9d78eb4217fad4911ccbca (diff) | |
download | gitlab-ce-56f50cbb3a63ae914f50eda3756b49d5cf516207.tar.gz |
Fix how to use PipelinesFinder
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/pipelines.rb | 2 | ||||
-rw-r--r-- | lib/api/v3/pipelines.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index bcb4fdcfe47..986dd607e23 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -29,7 +29,7 @@ module API get ':id/pipelines' do authorize! :read_pipeline, user_project - pipelines = PipelinesFinder.new(user_project, params).execute(scope: params[:scope]) + pipelines = PipelinesFinder.new(user_project, params).execute present paginate(pipelines), with: Entities::PipelineBasic end diff --git a/lib/api/v3/pipelines.rb b/lib/api/v3/pipelines.rb index 82827249244..c48cbd2b765 100644 --- a/lib/api/v3/pipelines.rb +++ b/lib/api/v3/pipelines.rb @@ -21,7 +21,7 @@ module API get ':id/pipelines' do authorize! :read_pipeline, user_project - pipelines = PipelinesFinder.new(user_project).execute(scope: params[:scope]) + pipelines = PipelinesFinder.new(user_project, scope: params[:scope]).execute present paginate(pipelines), with: ::API::Entities::Pipeline end end |