diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-04 20:11:19 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-04 20:11:19 +0300 |
commit | 74c8669b0a96b6afcb41ce5e09b147c7309ecbeb (patch) | |
tree | 9aafc9d41139a4e63305350ec2bc812a84e3f0a1 /lib/api/milestones.rb | |
parent | bd67459131e22273b502eb27d97709827ff42262 (diff) |
Use the pagination helper in the API
Diffstat (limited to 'lib/api/milestones.rb')
-rw-r--r-- | lib/api/milestones.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb index 50d6109be3d..3c373a84ec5 100644 --- a/lib/api/milestones.rb +++ b/lib/api/milestones.rb @@ -1,6 +1,7 @@ module API - # Milestones API class Milestones < Grape::API + include PaginationParams + before { authenticate! } helpers do @@ -30,6 +31,7 @@ module API optional :state, type: String, values: %w[active closed all], default: 'all', desc: 'Return "active", "closed", or "all" milestones' optional :iid, type: Array[Integer], desc: 'The IID of the milestone' + use :pagination end get ":id/milestones" do authorize! :read_milestone, user_project @@ -103,6 +105,7 @@ module API end params do requires :milestone_id, type: Integer, desc: 'The ID of a project milestone' + use :pagination end get ":id/milestones/:milestone_id/issues" do authorize! :read_milestone, user_project |