mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
fixed codeclimate errors (partically)
This commit is contained in:
parent
3f41ce4ab4
commit
f4e0084895
103 changed files with 339 additions and 367 deletions
|
@ -45,8 +45,7 @@ module Api
|
|||
|
||||
def create_token(user)
|
||||
token_creator = AuthTokenCreator.create_with_defaults(user)
|
||||
hash = token_creator.token_in_hash
|
||||
hash
|
||||
token_creator.token_in_hash
|
||||
end
|
||||
|
||||
def check_ip_whitelist
|
||||
|
|
|
@ -103,9 +103,10 @@ module Api
|
|||
end
|
||||
|
||||
def verify_action
|
||||
action = if params[:template] == 'change'
|
||||
action = case params[:template]
|
||||
when 'change'
|
||||
@domain.registrant_update_confirmable?(verify_params[:token])
|
||||
elsif params[:template] == 'delete'
|
||||
when 'delete'
|
||||
@domain.registrant_delete_confirmable?(verify_params[:token])
|
||||
end
|
||||
|
||||
|
|
|
@ -77,9 +77,7 @@ module Api
|
|||
render json: { errors: [{ address: [error_msg] }] }, status: :bad_request and return
|
||||
end
|
||||
|
||||
if ENV['fax_enabled'] == 'true'
|
||||
contact.fax = params[:fax] if params[:fax].present?
|
||||
end
|
||||
contact.fax = params[:fax] if ENV['fax_enabled'] == 'true' && params[:fax].present?
|
||||
|
||||
logger.debug "ENV['fax_enabled'] is set to #{ENV['fax_enabled']}"
|
||||
if ENV['fax_enabled'] != 'true' && params[:fax]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue