mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Fix CC issues
This commit is contained in:
parent
7c35083a8b
commit
dd8d4c1085
6 changed files with 12 additions and 12 deletions
|
@ -12,9 +12,9 @@ plugins:
|
|||
duplication:
|
||||
enabled: true
|
||||
config:
|
||||
count_threshold: 3
|
||||
languages:
|
||||
ruby:
|
||||
mass_threshold: 26
|
||||
- ruby
|
||||
- javascript
|
||||
eslint:
|
||||
enabled: true
|
||||
|
|
|
@ -38,7 +38,7 @@ module Repp
|
|||
end
|
||||
|
||||
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)
|
||||
|
||||
# rubocop:disable Style/AndOr
|
||||
|
@ -76,7 +76,7 @@ module Repp
|
|||
private
|
||||
|
||||
def contact_create_params
|
||||
params.permit!
|
||||
params.permit(:domain_id, contacts: [%i[action code type]])
|
||||
end
|
||||
|
||||
def contact_params
|
||||
|
|
|
@ -37,8 +37,8 @@ module Repp
|
|||
end
|
||||
|
||||
def cta(action = 'add')
|
||||
dnssec_params[:dnssec][:dns_keys].each { |n| n[:action] = action }
|
||||
action = Actions::DomainUpdate.new(@domain, dnssec_params[:dnssec], current_user)
|
||||
params[:dns_keys].each { |n| n[:action] = action }
|
||||
action = Actions::DomainUpdate.new(@domain, dnssec_params, current_user)
|
||||
|
||||
# rubocop:disable Style/AndOr
|
||||
(handle_errors(@domain) and return) unless action.call
|
||||
|
@ -50,7 +50,7 @@ module Repp
|
|||
private
|
||||
|
||||
def dnssec_params
|
||||
params.permit!
|
||||
params.permit(:domain_id, dns_keys: [%i[action flags protocol alg public_key]])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,8 +13,8 @@ module Repp
|
|||
param :ipv6, Array, required: false, desc: 'Array of IPv6 values'
|
||||
end
|
||||
def create
|
||||
nameserver_params[:nameservers].each { |n| n[:action] = 'add' }
|
||||
action = Actions::DomainUpdate.new(@domain, params, current_user)
|
||||
params[:nameservers].each { |n| n[:action] = 'add' }
|
||||
action = Actions::DomainUpdate.new(@domain, nameserver_params, current_user)
|
||||
|
||||
unless action.call
|
||||
handle_errors(@domain)
|
||||
|
@ -45,7 +45,7 @@ module Repp
|
|||
end
|
||||
|
||||
def nameserver_params
|
||||
params.permit!
|
||||
params.permit(:domain_id, nameservers: [[:hostname, :action, ipv4: [], ipv6: []]])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@ module Repp
|
|||
private
|
||||
|
||||
def renew_params
|
||||
params.permit!
|
||||
params.permit(:domain_id, renew: %i[period period_unit])
|
||||
end
|
||||
|
||||
def validate_renew_period
|
||||
|
|
|
@ -31,7 +31,7 @@ module Repp
|
|||
end
|
||||
|
||||
def transfer_params
|
||||
params.permit!
|
||||
params.permit(:domain_id, transfer: [:transfer_code])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue