Merge pull request #1143 from internetee/create-whois-records-on-domain-release

Create whois records on domain release
This commit is contained in:
Timo Võhmar 2019-04-08 14:01:28 +03:00 committed by GitHub
commit 19fbfbd2df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 9 deletions

View file

@ -52,7 +52,7 @@ module Api
end
def update_whois_from_auction(auction)
whois_record = Whois::Record.find_or_create_by(name: auction.domain) do |record|
whois_record = Whois::Record.find_or_create_by!(name: auction.domain) do |record|
record.json = {}
end

View file

@ -92,7 +92,10 @@ module DNS
end
def update_whois_from_auction(auction)
whois_record = Whois::Record.find_by!(name: name)
whois_record = Whois::Record.find_or_create_by!(name: name) do |record|
record.json = {}
end
whois_record.update_from_auction(auction)
end
end

View file

@ -20,4 +20,4 @@ module Whois
end
end
end
end
end