mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
17 lines
394 B
Ruby
17 lines
394 B
Ruby
module ContactNotification
|
|
extend self
|
|
|
|
def notify_registrar(domain:, text:)
|
|
domain.registrar.notifications.create(text: text)
|
|
end
|
|
|
|
def notify_tech_contact(domain:)
|
|
text = "DNSKEYS for #{domain.name} are invalid!"
|
|
domain.tech_contacts.each do |tech|
|
|
contact = Contact.find(tech.id)
|
|
|
|
ContactInformMailer.notify(contact: contact, subject: text)
|
|
end
|
|
end
|
|
|
|
end
|