mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Updated contact#update request validation
This commit is contained in:
parent
7b750b7d9b
commit
3b7289607c
2 changed files with 12 additions and 3 deletions
|
@ -61,6 +61,7 @@ module Epp
|
|||
## UPDATE
|
||||
def validate_contact_update_request
|
||||
@ph = params_hash['epp']['command']['update']['update']
|
||||
update_attrs_present?
|
||||
xml_attrs_present?(@ph, [['id']])
|
||||
end
|
||||
|
||||
|
@ -70,6 +71,13 @@ module Epp
|
|||
value: { obj: 'id', val: code } }
|
||||
end
|
||||
|
||||
def update_attrs_present?
|
||||
return true if parsed_frame.css('add').present?
|
||||
return true if parsed_frame.css('rem').present?
|
||||
return true if parsed_frame.css('chg').present?
|
||||
epp_errors << { code: '2003', msg: I18n.t('errors.messages.required_parameter_missing', key: 'add, rem or chg') }
|
||||
end
|
||||
|
||||
## DELETE
|
||||
def validate_contact_delete_request
|
||||
@ph = params_hash['epp']['command']['delete']['delete']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue