Deserializers: Mirror ContactCreate from ContactUpdate

This commit is contained in:
Karl Erik Õunapuu 2020-10-13 14:43:45 +03:00
parent aac74e26f1
commit a782b19d28
No known key found for this signature in database
GPG key ID: C9DD647298A34764
3 changed files with 11 additions and 24 deletions

View file

@ -37,10 +37,14 @@ module Repp
end
def format_epp_errors
@epp_errors.each_with_index do |errors, index|
next unless errors[:code] == '2304' && errors[:value].present? &&
errors[:value][:val] == DomainStatus::SERVER_DELETE_PROHIBITED &&
errors[:value][:obj] == 'status'
@epp_errors.each_with_index do |error, index|
blocked_by_delete_prohibited?(error, index)
end
end
def blocked_by_delete_prohibited?(error, index)
if error[:code] == 2304 && error[:value][:val] == DomainStatus::SERVER_DELETE_PROHIBITED &&
error[:value][:obj] == 'status'
@epp_errors[index][:value][:val] = DomainStatus::PENDING_UPDATE
end

View file

@ -36,7 +36,7 @@ module Repp
return
end
render_success(create_update_success_data)
render_success(create_update_success_body)
end
## PUT /repp/v1/contacts/1
@ -50,7 +50,7 @@ module Repp
return
end
render_success(create_update_success_data)
render_success(create_update_success_body)
end
def contact_addr_present?