summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-05-18 01:05:11 +0000
committerRobert Speicher <robert@gitlab.com>2018-05-18 01:05:11 +0000
commit6c190d273d18d21e50dea65645185839bf067714 (patch)
treeb1a67f0dfec96ab4ada3e5363317ce408269e46b /lib/api
parentd6c8a55189d62430c7ca4ffa6e5bb63f15a7efc1 (diff)
downloadgitlab-ce-6c190d273d18d21e50dea65645185839bf067714.tar.gz
Move API group deletion to Sidekiq
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/groups.rb4
-rw-r--r--lib/api/v3/groups.rb5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 0d125cd7831..03b6b30a0d8 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -167,8 +167,10 @@ module API
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/46285')
destroy_conditionally!(group) do |group|
- ::Groups::DestroyService.new(group, current_user).execute
+ ::Groups::DestroyService.new(group, current_user).async_execute
end
+
+ accepted!
end
desc 'Get a list of projects in this group.' do
diff --git a/lib/api/v3/groups.rb b/lib/api/v3/groups.rb
index 3844fd4810d..4fa7d196e50 100644
--- a/lib/api/v3/groups.rb
+++ b/lib/api/v3/groups.rb
@@ -131,8 +131,9 @@ module API
delete ":id" do
group = find_group!(params[:id])
authorize! :admin_group, group
- Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/46285')
- present ::Groups::DestroyService.new(group, current_user).execute, with: Entities::GroupDetail, current_user: current_user
+ ::Groups::DestroyService.new(group, current_user).async_execute
+
+ accepted!
end
desc 'Get a list of projects in this group.' do