summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-08-01 08:42:09 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-08-01 08:42:09 +0200
commit34c1c8a3b14ab3b29fbde97532c89404d9573a1d (patch)
treefa5daadff4327fe4cc534fa43d4f91bc59b2367a /lib
parent1b72256fa14e65256d78347f81b289d43c44e991 (diff)
downloadgitlab-ce-34c1c8a3b14ab3b29fbde97532c89404d9573a1d.tar.gz
Minor fixes in the Env API endpointszj-env-external-url
Diffstat (limited to 'lib')
-rw-r--r--lib/api/environments.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb
index a50f007d697..819f80d8365 100644
--- a/lib/api/environments.rb
+++ b/lib/api/environments.rb
@@ -11,6 +11,10 @@ module API
detail 'This feature was introduced in GitLab 8.11.'
success Entities::Environment
end
+ params do
+ optional :page, type: Integer, desc: 'Page number of the current request'
+ optional :per_page, type: Integer, desc: 'Number of items per page'
+ end
get ':id/environments' do
authorize! :read_environment, user_project
@@ -51,7 +55,7 @@ module API
authorize! :update_environment, user_project
environment = user_project.environments.find(params[:environment_id])
-
+
update_params = declared(params, include_missing: false).extract!(:name, :external_url).to_h
if environment.update(update_params)
present environment, with: Entities::Environment