0
0
Fork 0

Fix removing allowed domains being done synchronously (#14302)

* Fix removing allowed domains being done synchronously

* Add tests
This commit is contained in:
ThibG 2020-07-15 21:08:19 +02:00 committed by GitHub
parent bfed7dd5f3
commit d658af7ff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 3 deletions

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class AfterUnallowDomainService < BaseService
def call(domain)
Account.where(domain: domain).find_each do |account|
SuspendAccountService.new.call(account, reserve_username: false)
end
end
end