summaryrefslogtreecommitdiff
path: root/app/controllers/projects/environments_controller.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-03 14:28:44 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-02-09 11:09:16 +0000
commitefa0502386a1868f7120ffd4291175291f0094ed (patch)
treee3408edb00847ee7134111ac4ec61f14f6fb435d /app/controllers/projects/environments_controller.rb
parent0fddece769352b650c01d3a0920eea05f378b940 (diff)
downloadgitlab-ce-efa0502386a1868f7120ffd4291175291f0094ed.tar.gz
Enable grouping and pagination in environmnets API
Diffstat (limited to 'app/controllers/projects/environments_controller.rb')
-rw-r--r--app/controllers/projects/environments_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index 0ec8f5bd64a..0d1095da6c2 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -16,7 +16,9 @@ class Projects::EnvironmentsController < Projects::ApplicationController
format.html
format.json do
render json: EnvironmentSerializer
- .new(project: @project, user: current_user)
+ .new(project: @project, user: @current_user)
+ .with_pagination(request, response)
+ .within_folders
.represent(@environments)
end
end