mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Attach nameservers to domain
This commit is contained in:
parent
f6ce3b4c4e
commit
d01944fe21
5 changed files with 22 additions and 3 deletions
|
@ -3,7 +3,7 @@ module Epp::DomainsHelper
|
|||
@domain = Domain.new(domain_create_params)
|
||||
|
||||
Domain.transaction do
|
||||
if @domain.save && @domain.attach_contacts(domain_contacts)
|
||||
if @domain.save && @domain.attach_contacts(domain_contacts) && @domain.attach_nameservers(domain_nameservers)
|
||||
render '/epp/domains/create'
|
||||
else
|
||||
handle_errors
|
||||
|
@ -50,6 +50,11 @@ module Epp::DomainsHelper
|
|||
res
|
||||
end
|
||||
|
||||
def domain_nameservers
|
||||
ph = params_hash['epp']['command']['create']['create']['ns']
|
||||
ph[:hostObj]
|
||||
end
|
||||
|
||||
def handle_errors
|
||||
super({
|
||||
'2302' => [:epp_domain_taken, :epp_domain_reserved],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue