mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
105842700-method_for_verification_url
This commit is contained in:
parent
6f0360bae6
commit
fe4aa3f0b3
1 changed files with 10 additions and 1 deletions
|
@ -26,7 +26,7 @@ class Registrant::DomainsController < RegistrantController
|
||||||
dom.pending_json.present?
|
dom.pending_json.present?
|
||||||
|
|
||||||
@domain = dom
|
@domain = dom
|
||||||
confirm_path = "#{ENV['registrant_url']}/registrant/domain_update_confirms"
|
confirm_path = get_confirm_path(dom.statuses)
|
||||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -74,4 +74,13 @@ class Registrant::DomainsController < RegistrantController
|
||||||
yield
|
yield
|
||||||
params[:q][:valid_to_lteq] = ca_cache
|
params[:q][:valid_to_lteq] = ca_cache
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_confirm_path(statuses)
|
||||||
|
if statuses.include?(DomainStatus::PENDING_UPDATE)
|
||||||
|
"#{ENV['registrant_url']}/registrant/domain_update_confirms"
|
||||||
|
elsif statuses.include?(DomainStatus::PENDING_DELETE)
|
||||||
|
"#{ENV['registrant_url']}/registrant/domain_delete_confirms"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
Loading…
Add table
Add a link
Reference in a new issue