mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Contact code generation
This commit is contained in:
parent
2d2a12b7d0
commit
aecb919610
3 changed files with 10 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
module Epp::ContactsHelper
|
||||
def create_contact
|
||||
@contact = Contact.new(contact_and_address_attributes)
|
||||
@contact.generate_code
|
||||
render '/epp/contacts/create' and return if stamp(@contact) && @contact.save
|
||||
|
||||
handle_errors(@contact)
|
||||
|
@ -54,7 +55,7 @@ module Epp::ContactsHelper
|
|||
## CREATE
|
||||
def validate_contact_create_request
|
||||
@ph = params_hash['epp']['command']['create']['create']
|
||||
xml_attrs_present?(@ph, [%w(id), %w(authInfo pw), %w(postalInfo)])
|
||||
xml_attrs_present?(@ph, [ %w(authInfo pw), %w(postalInfo)])
|
||||
|
||||
return epp_errors.empty? unless @ph['postalInfo'].is_a?(Hash) || @ph['postalInfo'].is_a?(Array)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue