mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Refactor epp requests closer to international standard
This commit is contained in:
parent
4684b311a2
commit
9def6a7c27
11 changed files with 81 additions and 70 deletions
|
@ -1,6 +1,6 @@
|
|||
module Epp::ContactsHelper
|
||||
def create_contact
|
||||
ph = get_params_hash('epp command create create')[:create]
|
||||
ph = params_hash
|
||||
|
||||
@contact = Contact.new(
|
||||
code: ph[:id],
|
||||
|
|
|
@ -5,7 +5,7 @@ module Epp::DomainsHelper
|
|||
end
|
||||
|
||||
def check_domain
|
||||
ph = get_params_hash('epp command check check')[:check]
|
||||
ph = params_hash['epp']['command']['check']['check']
|
||||
@domains = Domain.check_availability(ph[:name])
|
||||
render '/epp/domains/check'
|
||||
end
|
||||
|
@ -13,7 +13,7 @@ module Epp::DomainsHelper
|
|||
### HELPER METHODS ###
|
||||
|
||||
def domain_create_params
|
||||
ph = get_params_hash('epp command create create')[:create]
|
||||
ph = params_hash['epp']['command']['create']['create']
|
||||
|
||||
{
|
||||
name: ph[:name],
|
||||
|
@ -21,7 +21,7 @@ module Epp::DomainsHelper
|
|||
registered_at: Time.now,
|
||||
valid_from: Date.today,
|
||||
valid_to: Date.today + ph[:period].to_i.years,
|
||||
auth_info: ph[:authInfo]
|
||||
auth_info: ph[:authInfo][:pw]
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue