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/groups.rb
parent998afa5f74558be215a924d95aa131a69831ca43 (diff)
Conditionally destroy a ressource
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index c9b32a85487..ee2ad27837b 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -117,11 +117,10 @@ module API
delete ":id" do
group = find_group!(params[:id])
authorize! :admin_group, group
-
- check_unmodified_since(group.updated_at)
- status 204
- ::Groups::DestroyService.new(group, current_user).execute
+ destroy_conditionally!(group) do |group|
+ ::Groups::DestroyService.new(group, current_user).execute
+ end
end
desc 'Get a list of projects in this group.' do