mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Refactor
This commit is contained in:
parent
2187be6364
commit
acb65c47d6
7 changed files with 39 additions and 70 deletions
|
@ -10,12 +10,14 @@ class Epp::CommandsController < ApplicationController
|
|||
|
||||
private
|
||||
def create
|
||||
type = OBJECT_TYPES[parsed_frame.css('create create').attr('schemaLocation').value]
|
||||
ph = get_params_hash('create create')[:create]
|
||||
type = OBJECT_TYPES[ph[:schemaLocation]]
|
||||
send("create_#{type}")
|
||||
end
|
||||
|
||||
def check
|
||||
type = OBJECT_TYPES[parsed_frame.css('check check').attr('schemaLocation').value]
|
||||
ph = get_params_hash('check check')[:check]
|
||||
type = OBJECT_TYPES[ph[:schemaLocation]]
|
||||
send("check_#{type}")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ class Epp::SessionsController < ApplicationController
|
|||
### HELPER METHODS ###
|
||||
|
||||
def login_params
|
||||
login_params = parsed_frame.css('epp command login')
|
||||
{ username: login_params.css('clID').text, password: login_params.css('pw').text }
|
||||
ph = get_params_hash('epp command login')[:login]
|
||||
{ username: ph[:clID], password: ph[:pw] }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue