mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Add notification on autoFD
This commit is contained in:
parent
81c21db392
commit
91093b274d
6 changed files with 42 additions and 10 deletions
|
@ -11,12 +11,16 @@ module Domains
|
|||
domains = domain_contacts.map(&:domain).flatten +
|
||||
Domain.where(registrant_id: registrant_ids)
|
||||
|
||||
domains.each do |domain|
|
||||
next if domain.force_delete_scheduled?
|
||||
domains.each { |domain| process_force_delete(domain) unless domain.force_delete_scheduled? }
|
||||
end
|
||||
|
||||
domain.schedule_force_delete(type: :soft,
|
||||
notify_by_email: true, reason: 'invalid_email')
|
||||
end
|
||||
private
|
||||
|
||||
def process_force_delete(domain)
|
||||
domain.schedule_force_delete(type: :soft,
|
||||
notify_by_email: true,
|
||||
reason: 'invalid_email',
|
||||
email: email)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue