mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +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
|
||||
ph = params_hash['epp']['command']['delete']['delete']
|
||||
|
||||
begin
|
||||
@contact = Contact.where(code: ph[:id]).first
|
||||
@contact.destroy
|
||||
render '/epp/contacts/delete'
|
||||
rescue NoMethodError => e
|
||||
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||
render '/epp/error'
|
||||
rescue
|
||||
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
|
||||
render '/epp/error'
|
||||
end
|
||||
@contact = Contact.where(code: ph[:id]).first
|
||||
@contact.destroy
|
||||
render '/epp/contacts/delete'
|
||||
rescue NoMethodError => e
|
||||
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
||||
render '/epp/error'
|
||||
rescue
|
||||
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
|
||||
render '/epp/error'
|
||||
end
|
||||
|
||||
def check_contact
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue