summaryrefslogtreecommitdiff
path: root/lib/api/namespaces.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/namespaces.rb
parentbd67459131e22273b502eb27d97709827ff42262 (diff)
downloadgitlab-ce-74c8669b0a96b6afcb41ce5e09b147c7309ecbeb.tar.gz
Use the pagination helper in the APIuse-pagination-helper
Diffstat (limited to 'lib/api/namespaces.rb')
-rw-r--r--lib/api/namespaces.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/namespaces.rb b/lib/api/namespaces.rb
index fe981d7b9fa..30761cb9b55 100644
--- a/lib/api/namespaces.rb
+++ b/lib/api/namespaces.rb
@@ -1,6 +1,7 @@
module API
- # namespaces API
class Namespaces < Grape::API
+ include PaginationParams
+
before { authenticate! }
resource :namespaces do
@@ -9,6 +10,7 @@ module API
end
params do
optional :search, type: String, desc: "Search query for namespaces"
+ use :pagination
end
get do
namespaces = current_user.admin ? Namespace.all : current_user.namespaces