mirror of
https://github.com/internetee/registry.git
synced 2025-08-18 15:33:52 +02:00
Merge d3bc769d5b
into c8a0788366
This commit is contained in:
commit
dd520c10d1
1 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,7 @@ module Repp
|
||||||
before_action :validate_registrar_authorization, only: %i[transfer_info destroy]
|
before_action :validate_registrar_authorization, only: %i[transfer_info destroy]
|
||||||
before_action :forward_registrar_id, only: %i[create update destroy]
|
before_action :forward_registrar_id, only: %i[create update destroy]
|
||||||
before_action :set_domain, only: %i[update]
|
before_action :set_domain, only: %i[update]
|
||||||
|
before_action :transaform_period_value_to_integer, only: %i[create]
|
||||||
|
|
||||||
THROTTLED_ACTIONS = %i[transfer_info transfer index create show update destroy].freeze
|
THROTTLED_ACTIONS = %i[transfer_info transfer index create show update destroy].freeze
|
||||||
include Shunter::Integration::Throttle
|
include Shunter::Integration::Throttle
|
||||||
|
@ -257,6 +258,10 @@ module Repp
|
||||||
modify_contact_params(dup_params)
|
modify_contact_params(dup_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def transaform_period_value_to_integer
|
||||||
|
params[:domain][:period] = params[:domain][:period].to_i
|
||||||
|
end
|
||||||
|
|
||||||
def modify_contact_params(params)
|
def modify_contact_params(params)
|
||||||
new_contact_params = params[:contacts].map { |c| c.to_h.symbolize_keys }
|
new_contact_params = params[:contacts].map { |c| c.to_h.symbolize_keys }
|
||||||
old_contact_params = @domain.domain_contacts.includes(:contact).map do |c|
|
old_contact_params = @domain.domain_contacts.includes(:contact).map do |c|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue