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
282 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, reserve_username: false)
  6. end
  7. domain_allow.destroy
  8. end
  9. end