This commit is contained in:
OlegPhenomenon 2025-08-10 02:06:18 +00:00 committed by GitHub
commit dd520c10d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@ module Repp
before_action :validate_registrar_authorization, only: %i[transfer_info destroy]
before_action :forward_registrar_id, only: %i[create update destroy]
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
include Shunter::Integration::Throttle
@ -257,6 +258,10 @@ module Repp
modify_contact_params(dup_params)
end
def transaform_period_value_to_integer
params[:domain][:period] = params[:domain][:period].to_i
end
def modify_contact_params(params)
new_contact_params = params[:contacts].map { |c| c.to_h.symbolize_keys }
old_contact_params = @domain.domain_contacts.includes(:contact).map do |c|