summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.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/project_snippets.rb
parentbd67459131e22273b502eb27d97709827ff42262 (diff)
downloadgitlab-ce-74c8669b0a96b6afcb41ce5e09b147c7309ecbeb.tar.gz
Use the pagination helper in the APIuse-pagination-helper
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index d0ee9c9a5b2..9d8c5b63685 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -1,6 +1,7 @@
module API
- # Projects API
class ProjectSnippets < Grape::API
+ include PaginationParams
+
before { authenticate! }
params do
@@ -24,6 +25,9 @@ module API
desc 'Get all project snippets' do
success Entities::ProjectSnippet
end
+ params do
+ use :pagination
+ end
get ":id/snippets" do
present paginate(snippets_for_current_user), with: Entities::ProjectSnippet
end