diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-05 12:11:14 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-05 12:11:14 +0000 |
commit | d134c72523fb54d4b5e21a160553839099c4ab35 (patch) | |
tree | a3619abe4e61a58da8fd2385ce3cefe756c65e55 /lib/api/runners.rb | |
parent | 9cbee6ecf34191d04c0c85be79828fb08de2abf6 (diff) | |
parent | 74c8669b0a96b6afcb41ce5e09b147c7309ecbeb (diff) | |
download | gitlab-ce-d134c72523fb54d4b5e21a160553839099c4ab35.tar.gz |
Merge branch 'use-pagination-helper' into 'master'
Use the pagination helper in the API
See merge request !7920
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r-- | lib/api/runners.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb index b145cce7e3e..4816b5ed1b7 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -1,5 +1,7 @@ module API class Runners < Grape::API + include PaginationParams + before { authenticate! } resource :runners do @@ -9,6 +11,7 @@ module API params do optional :scope, type: String, values: %w[active paused online], desc: 'The scope of specific runners to show' + use :pagination end get do runners = filter_runners(current_user.ci_authorized_runners, params[:scope], without: ['specific', 'shared']) @@ -21,6 +24,7 @@ module API params do optional :scope, type: String, values: %w[active paused online specific shared], desc: 'The scope of specific runners to show' + use :pagination end get 'all' do authenticated_as_admin! @@ -91,6 +95,7 @@ module API params do optional :scope, type: String, values: %w[active paused online specific shared], desc: 'The scope of specific runners to show' + use :pagination end get ':id/runners' do runners = filter_runners(Ci::Runner.owned_or_shared(user_project.id), params[:scope]) |