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:
authorSemyon Pupkov <mail@semyonpupkov.com>2016-11-21 22:15:46 +0300
committerSemyon Pupkov <mail@semyonpupkov.com>2016-11-22 07:19:26 +0300
commit77cf855bb995eb8875b41d5683c30bae2d17f2f4 (patch)
treeca476011924646484be55130438ea7e3295b60ab /lib/api/variables.rb
parent53714ddf2bcc56659236d87647d8b8e8412592f3 (diff)
Define common helper for describe pagination params in api
Diffstat (limited to 'lib/api/variables.rb')
-rw-r--r--lib/api/variables.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index b9fb3c21dbb..90f904b8a12 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -1,6 +1,8 @@
module API
# Projects variables API
class Variables < Grape::API
+ include PaginationParams
+
before { authenticate! }
before { authorize! :admin_build, user_project }
@@ -13,8 +15,7 @@ module API
success Entities::Variable
end
params do
- optional :page, type: Integer, desc: 'The page number for pagination'
- optional :per_page, type: Integer, desc: 'The value of items per page to show'
+ use :pagination
end
get ':id/variables' do
variables = user_project.variables