mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
parent
c8fd0eb1a4
commit
74598ccf23
2 changed files with 11 additions and 4 deletions
|
@ -17,9 +17,16 @@ class Epp::ContactsController < EppController
|
|||
|
||||
def create
|
||||
authorize! :create, Epp::Contact
|
||||
@contact = Epp::Contact.new(params[:parsed_frame], current_user.registrar)
|
||||
frame = params[:parsed_frame]
|
||||
@contact = Epp::Contact.new(frame, current_user.registrar)
|
||||
|
||||
@contact.add_legal_file_to_new(params[:parsed_frame])
|
||||
@contact.add_legal_file_to_new(frame)
|
||||
|
||||
@response_code = if Contact.address_processing
|
||||
1000
|
||||
else
|
||||
frame.css('postalInfo addr').size != 0 ? 1100 : 1000
|
||||
end
|
||||
|
||||
if @contact.save
|
||||
render_epp_response '/epp/contacts/create'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xml.epp_head do
|
||||
xml.response do
|
||||
xml.result('code' => '1000') do
|
||||
xml.result('code' => @response_code) do
|
||||
xml.msg 'Command completed successfully'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue