Fix CC issues

This commit is contained in:
Karl Erik Õunapuu 2021-01-28 12:47:06 +02:00
parent 7c35083a8b
commit dd8d4c1085
No known key found for this signature in database
GPG key ID: C9DD647298A34764
6 changed files with 12 additions and 12 deletions

View file

@ -12,9 +12,9 @@ plugins:
duplication: duplication:
enabled: true enabled: true
config: config:
count_threshold: 3
languages: languages:
ruby: - ruby
mass_threshold: 26
- javascript - javascript
eslint: eslint:
enabled: true enabled: true

View file

@ -38,7 +38,7 @@ module Repp
end end
def cta(action = 'add') def cta(action = 'add')
contact_create_params[:contacts].each { |c| c[:action] = action } params[:contacts].each { |c| c[:action] = action }
action = Actions::DomainUpdate.new(@domain, contact_create_params, current_user) action = Actions::DomainUpdate.new(@domain, contact_create_params, current_user)
# rubocop:disable Style/AndOr # rubocop:disable Style/AndOr
@ -76,7 +76,7 @@ module Repp
private private
def contact_create_params def contact_create_params
params.permit! params.permit(:domain_id, contacts: [%i[action code type]])
end end
def contact_params def contact_params

View file

@ -37,8 +37,8 @@ module Repp
end end
def cta(action = 'add') def cta(action = 'add')
dnssec_params[:dnssec][:dns_keys].each { |n| n[:action] = action } params[:dns_keys].each { |n| n[:action] = action }
action = Actions::DomainUpdate.new(@domain, dnssec_params[:dnssec], current_user) action = Actions::DomainUpdate.new(@domain, dnssec_params, current_user)
# rubocop:disable Style/AndOr # rubocop:disable Style/AndOr
(handle_errors(@domain) and return) unless action.call (handle_errors(@domain) and return) unless action.call
@ -50,7 +50,7 @@ module Repp
private private
def dnssec_params def dnssec_params
params.permit! params.permit(:domain_id, dns_keys: [%i[action flags protocol alg public_key]])
end end
end end
end end

View file

@ -13,8 +13,8 @@ module Repp
param :ipv6, Array, required: false, desc: 'Array of IPv6 values' param :ipv6, Array, required: false, desc: 'Array of IPv6 values'
end end
def create def create
nameserver_params[:nameservers].each { |n| n[:action] = 'add' } params[:nameservers].each { |n| n[:action] = 'add' }
action = Actions::DomainUpdate.new(@domain, params, current_user) action = Actions::DomainUpdate.new(@domain, nameserver_params, current_user)
unless action.call unless action.call
handle_errors(@domain) handle_errors(@domain)
@ -45,7 +45,7 @@ module Repp
end end
def nameserver_params def nameserver_params
params.permit! params.permit(:domain_id, nameservers: [[:hostname, :action, ipv4: [], ipv6: []]])
end end
end end
end end

View file

@ -36,7 +36,7 @@ module Repp
private private
def renew_params def renew_params
params.permit! params.permit(:domain_id, renew: %i[period period_unit])
end end
def validate_renew_period def validate_renew_period

View file

@ -31,7 +31,7 @@ module Repp
end end
def transfer_params def transfer_params
params.permit! params.permit(:domain_id, transfer: [:transfer_code])
end end
end end
end end