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-03-02 15:14:13 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-28 17:40:25 +0300
commite80313f9ee5b3495a8713e6ddae111bc8106155b (patch)
treef1327448ef9e837aedb9fde9a50d6531e42a6112 /lib/api/environments.rb
parent998afa5f74558be215a924d95aa131a69831ca43 (diff)
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/environments.rb')
-rw-r--r--lib/api/environments.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb
index 3fc423ae79a..e33269f9483 100644
--- a/lib/api/environments.rb
+++ b/lib/api/environments.rb
@@ -78,10 +78,8 @@ module API
authorize! :update_environment, user_project
environment = user_project.environments.find(params[:environment_id])
- check_unmodified_since(environment.updated_at)
- status 204
- environment.destroy
+ destroy_conditionally!(environment)
end
desc 'Stops an existing environment' do