Fix removing allowed domains being done synchronously (#14302)
* Fix removing allowed domains being done synchronously * Add tests
This commit is contained in:
parent
bfed7dd5f3
commit
d658af7ff8
4 changed files with 84 additions and 3 deletions
9
app/services/after_unallow_domain_service.rb
Normal file
9
app/services/after_unallow_domain_service.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue