mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
rubocop update, now it's green
This commit is contained in:
parent
2d6ed7fa45
commit
8d189023c7
29 changed files with 190 additions and 54 deletions
|
@ -20,6 +20,7 @@ module Epp::ContactsHelper
|
|||
end
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/CyclomaticComplexity
|
||||
def delete_contact
|
||||
@contact = find_contact
|
||||
handle_errors(@contact) and return unless owner?
|
||||
|
@ -28,6 +29,7 @@ module Epp::ContactsHelper
|
|||
|
||||
render '/epp/contacts/delete'
|
||||
end
|
||||
# rubocop:enable Metrics/CyclomaticComplexity
|
||||
|
||||
def check_contact
|
||||
ph = params_hash['epp']['command']['check']['check']
|
||||
|
|
|
@ -43,6 +43,7 @@ module Epp::DomainsHelper
|
|||
render '/epp/domains/info'
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/CyclomaticComplexity
|
||||
def update_domain
|
||||
Epp::EppDomain.transaction do
|
||||
@domain = find_domain
|
||||
|
@ -66,6 +67,7 @@ module Epp::DomainsHelper
|
|||
render '/epp/domains/success'
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/CyclomaticComplexity
|
||||
|
||||
def transfer_domain
|
||||
@domain = find_domain(secure: false)
|
||||
|
@ -76,6 +78,7 @@ module Epp::DomainsHelper
|
|||
render '/epp/domains/transfer'
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/CyclomaticComplexity
|
||||
def delete_domain
|
||||
@domain = find_domain
|
||||
|
||||
|
@ -85,6 +88,7 @@ module Epp::DomainsHelper
|
|||
|
||||
render '/epp/domains/success'
|
||||
end
|
||||
# rubocop:enbale Metrics/CyclomaticComplexity
|
||||
|
||||
### HELPER METHODS ###
|
||||
|
||||
|
@ -156,12 +160,20 @@ module Epp::DomainsHelper
|
|||
domain = Epp::EppDomain.find_by(name: @ph[:name])
|
||||
|
||||
unless domain
|
||||
epp_errors << { code: '2303', msg: I18n.t('errors.messages.epp_domain_not_found'), value: { obj: 'name', val: @ph[:name] } }
|
||||
epp_errors << {
|
||||
code: '2303',
|
||||
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
||||
value: { obj: 'name', val: @ph[:name] }
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
||||
if domain.registrar != current_epp_user.registrar && secure[:secure] == true
|
||||
epp_errors << { code: '2302', msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'), value: { obj: 'name', val: @ph[:name] } }
|
||||
epp_errors << {
|
||||
code: '2302',
|
||||
msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'),
|
||||
value: { obj: 'name', val: @ph[:name] }
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue