diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-04 18:11:19 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-04 18:11:19 +0100 |
commit | 74c8669b0a96b6afcb41ce5e09b147c7309ecbeb (patch) | |
tree | 9aafc9d41139a4e63305350ec2bc812a84e3f0a1 /lib/api/notes.rb | |
parent | bd67459131e22273b502eb27d97709827ff42262 (diff) | |
download | gitlab-ce-74c8669b0a96b6afcb41ce5e09b147c7309ecbeb.tar.gz |
Use the pagination helper in the APIuse-pagination-helper
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r-- | lib/api/notes.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb index b255b47742b..d0faf17714b 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -1,6 +1,7 @@ module API - # Notes API class Notes < Grape::API + include PaginationParams + before { authenticate! } NOTEABLE_TYPES = [Issue, MergeRequest, Snippet] @@ -17,6 +18,7 @@ module API end params do requires :noteable_id, type: Integer, desc: 'The ID of the noteable' + use :pagination end get ":id/#{noteables_str}/:noteable_id/notes" do noteable = user_project.send(noteables_str.to_sym).find(params[:noteable_id]) |