mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 05:05:45 +02:00
Send unregistered domain to auction after dispute is closed
This commit is contained in:
parent
dc9bf7a5d3
commit
529a8a1bf6
2 changed files with 12 additions and 2 deletions
|
@ -55,8 +55,16 @@ class Dispute < ApplicationRecord
|
|||
return false unless update(closed: true)
|
||||
return if Dispute.active.where(domain_name: domain_name).any?
|
||||
|
||||
whois_record = Whois::Record.find_or_initialize_by(name: domain_name)
|
||||
return true if remove_whois_data(whois_record)
|
||||
domain = DNS::DomainName.new(domain_name)
|
||||
if domain.available? && domain.auctionable?
|
||||
domain.sell_at_auction
|
||||
return true
|
||||
else
|
||||
whois_record = Whois::Record.find_or_initialize_by(name: domain_name)
|
||||
return true if remove_whois_data(whois_record)
|
||||
end
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
def remove_whois_data(record)
|
||||
|
|
|
@ -29,6 +29,8 @@ module DNS
|
|||
:at_auction
|
||||
elsif awaiting_payment?
|
||||
:awaiting_payment
|
||||
elsif disputed?
|
||||
:disputed
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue