mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
23 lines
598 B
Ruby
23 lines
598 B
Ruby
class Epp::CommandsController < ApplicationController
|
|
include Epp::Common
|
|
include Epp::DomainsHelper
|
|
include Epp::ContactsHelper
|
|
|
|
OBJECT_TYPES = {
|
|
'http://www.nic.cz/xml/epp/domain-1.4 domain-1.4.xsd' => 'domain',
|
|
'http://www.nic.cz/xml/epp/contact-1.6 contact-1.6.xsd' => 'contact'
|
|
}
|
|
|
|
private
|
|
def create
|
|
ph = get_params_hash('create create')[:create]
|
|
type = OBJECT_TYPES[ph[:schemaLocation]]
|
|
send("create_#{type}")
|
|
end
|
|
|
|
def check
|
|
ph = get_params_hash('check check')[:check]
|
|
type = OBJECT_TYPES[ph[:schemaLocation]]
|
|
send("check_#{type}")
|
|
end
|
|
end
|