You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
272 B

  1. # frozen_string_literal: true
  2. class UnallowDomainService < BaseService
  3. def call(domain_allow)
  4. Account.where(domain: domain_allow.domain).find_each do |account|
  5. SuspendAccountService.new.call(account, destroy: true)
  6. end
  7. domain_allow.destroy
  8. end
  9. end