Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-01-17 07:45:07 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2017-02-16 17:32:01 +0300
commit01ea65e0e9ea5e44fa653fb95e7ba8ca1668af98 (patch)
treeb7360600a01fff3a1e47a4d8c4f00b42d81fe836 /lib/api/project_hooks.rb
parent28d8b8650759d0032bcfd0fd9b4397d139a43984 (diff)
Paginate all endpoints that return an array
Diffstat (limited to 'lib/api/project_hooks.rb')
-rw-r--r--lib/api/project_hooks.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb
index cb679e6658a..f7a28d7ad10 100644
--- a/lib/api/project_hooks.rb
+++ b/lib/api/project_hooks.rb
@@ -32,9 +32,7 @@ module API
use :pagination
end
get ":id/hooks" do
- hooks = paginate user_project.hooks
-
- present hooks, with: Entities::ProjectHook
+ present paginate(user_project.hooks), with: Entities::ProjectHook
end
desc 'Get a project hook' do