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:
Diffstat (limited to 'lib/api/environments.rb')
-rw-r--r--lib/api/environments.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb
index 945771d46f3..5c63ec028d9 100644
--- a/lib/api/environments.rb
+++ b/lib/api/environments.rb
@@ -9,7 +9,7 @@ module API
params do
requires :id, type: String, desc: 'The project ID'
end
- resource :projects, requirements: { id: %r{[^/]+} } do
+ resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do
desc 'Get all environments of the project' do
detail 'This feature was introduced in GitLab 8.11.'
success Entities::Environment
@@ -79,7 +79,7 @@ module API
environment = user_project.environments.find(params[:environment_id])
- environment.destroy
+ destroy_conditionally!(environment)
end
desc 'Stops an existing environment' do