mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37:30 +02:00
parent
5d61cbf4a8
commit
daba47790c
9 changed files with 125 additions and 125 deletions
|
@ -30,6 +30,12 @@ module Api
|
|||
raise "Invalid status #{params[:status]}"
|
||||
end
|
||||
|
||||
if auction.payment_not_received? || auction.domain_not_registered?
|
||||
update_whois_from_auction(Auction.pending(auction.domain))
|
||||
else
|
||||
update_whois_from_auction(auction)
|
||||
end
|
||||
|
||||
render json: serializable_hash_for_update_action(auction)
|
||||
end
|
||||
|
||||
|
@ -44,6 +50,11 @@ module Api
|
|||
hash[:registration_code] = auction.registration_code if auction.payment_received?
|
||||
hash
|
||||
end
|
||||
|
||||
def update_whois_from_auction(auction)
|
||||
whois_record = Whois::Record.find_by!(name: auction.domain)
|
||||
whois_record.update_from_auction(auction)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue