Fix removing allowed domains being done synchronously (#14302)
* Fix removing allowed domains being done synchronously * Add tests
This commit is contained in:
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
|
Reference in New Issue
Block a user