summaryrefslogtreecommitdiff
path: root/lib/api/runners.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-12-04 18:11:19 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2016-12-04 18:11:19 +0100
commit74c8669b0a96b6afcb41ce5e09b147c7309ecbeb (patch)
tree9aafc9d41139a4e63305350ec2bc812a84e3f0a1 /lib/api/runners.rb
parentbd67459131e22273b502eb27d97709827ff42262 (diff)
downloadgitlab-ce-74c8669b0a96b6afcb41ce5e09b147c7309ecbeb.tar.gz
Use the pagination helper in the APIuse-pagination-helper
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r--lib/api/runners.rb5
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])