mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
parent
640faaadb9
commit
42e8f86dae
51 changed files with 1619 additions and 53 deletions
|
@ -1,5 +1,23 @@
|
|||
module Whois
|
||||
class Record < Whois::Server
|
||||
self.table_name = 'whois_records'
|
||||
|
||||
def self.disclaimer
|
||||
Setting.registry_whois_disclaimer
|
||||
end
|
||||
|
||||
def self.refresh(domain_name)
|
||||
if domain_name.at_auction?
|
||||
create!(name: domain_name, json: { name: domain_name.to_s,
|
||||
status: 'AtAuction',
|
||||
disclaimer: disclaimer })
|
||||
elsif domain_name.awaiting_payment? || domain_name.pending_registration?
|
||||
find_by(name: domain_name.to_s).update!(json: { name: domain_name.to_s,
|
||||
status: 'PendingRegistration',
|
||||
disclaimer: disclaimer })
|
||||
else
|
||||
find_by(name: domain_name.to_s).destroy!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue