From 34c1c8a3b14ab3b29fbde97532c89404d9573a1d Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Mon, 1 Aug 2016 08:42:09 +0200 Subject: Minor fixes in the Env API endpoints --- lib/api/environments.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/api/environments.rb') 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 -- cgit v1.2.3