mirror of
https://github.com/internetee/registry.git
synced 2025-08-13 04:59:42 +02:00
Removed redundant begin clause
This commit is contained in:
parent
a0d5823979
commit
862b784761
1 changed files with 9 additions and 11 deletions
|
@ -23,17 +23,15 @@ module Epp::ContactsHelper
|
||||||
def delete_contact
|
def delete_contact
|
||||||
ph = params_hash['epp']['command']['delete']['delete']
|
ph = params_hash['epp']['command']['delete']['delete']
|
||||||
|
|
||||||
begin
|
@contact = Contact.where(code: ph[:id]).first
|
||||||
@contact = Contact.where(code: ph[:id]).first
|
@contact.destroy
|
||||||
@contact.destroy
|
render '/epp/contacts/delete'
|
||||||
render '/epp/contacts/delete'
|
rescue NoMethodError => e
|
||||||
rescue NoMethodError => e
|
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||||
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
render '/epp/error'
|
||||||
render '/epp/error'
|
rescue
|
||||||
rescue
|
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
|
||||||
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
|
render '/epp/error'
|
||||||
render '/epp/error'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_contact
|
def check_contact
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue