summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-03-31 21:29:51 -0700
committerStan Hu <stanhu@gmail.com>2017-04-02 05:37:05 -0700
commit6a2d022d1d578f8957736de2fb895069c24c072b (patch)
tree206166bcce0e3256b7d8151e5b9172fc01ae4e5a /lib/api
parent8a71d40e60c799f969af0ed255e931b6c9907634 (diff)
downloadgitlab-ce-6a2d022d1d578f8957736de2fb895069c24c072b.tar.gz
Delete users asynchronouslysh-fix-destroy-user-race
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index a4201fe6fed..530ca0b5235 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -293,7 +293,7 @@ module API
user = User.find_by(id: params[:id])
not_found!('User') unless user
- ::Users::DestroyService.new(current_user).execute(user)
+ DeleteUserWorker.perform_async(current_user.id, user.id)
end
desc 'Block a user. Available only for admins.'