diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-01-17 05:45:07 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-16 15:32:01 +0100 |
commit | 01ea65e0e9ea5e44fa653fb95e7ba8ca1668af98 (patch) | |
tree | b7360600a01fff3a1e47a4d8c4f00b42d81fe836 /lib/api/labels.rb | |
parent | 28d8b8650759d0032bcfd0fd9b4397d139a43984 (diff) | |
download | gitlab-ce-01ea65e0e9ea5e44fa653fb95e7ba8ca1668af98.tar.gz |
Paginate all endpoints that return an array
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r-- | lib/api/labels.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index 652786d4e3e..d2955af3f95 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -1,6 +1,7 @@ module API - # Labels API class Labels < Grape::API + include PaginationParams + before { authenticate! } params do @@ -10,8 +11,11 @@ module API desc 'Get all labels of the project' do success Entities::Label end + params do + use :pagination + end get ':id/labels' do - present available_labels, with: Entities::Label, current_user: current_user, project: user_project + present paginate(available_labels), with: Entities::Label, current_user: current_user, project: user_project end desc 'Create a new label' do |