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

class BlockDomainFromAccountService < BaseService
  def call(account, domain)
    account.block_domain!(domain)
    account.passive_relationships.where(account: Account.where(domain: domain)).delete_all
  end
end