about summary refs log tree commit diff
path: root/app/services/unallow_domain_service.rb
blob: bd1ad328dacae06933039aae85da51644e8a4a90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class UnallowDomainService < BaseService
  def call(domain_allow)
    Account.where(domain: domain_allow.domain).find_each do |account|
      SuspendAccountService.new.call(account, reserve_username: false)
    end

    domain_allow.destroy
  end
end