mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
changed validation email principles
This commit is contained in:
parent
89bc8583ba
commit
c972308f03
2 changed files with 1 additions and 12 deletions
|
@ -92,7 +92,6 @@ class Registrar
|
|||
def create
|
||||
authorize! :create, Depp::Domain
|
||||
@domain_params = domain_params.to_h
|
||||
# @data = @domain.create(@domain_params) if emails_valid?
|
||||
@data = @domain.create(@domain_params)
|
||||
|
||||
if @data && response_ok?
|
||||
|
@ -113,10 +112,8 @@ class Registrar
|
|||
def update
|
||||
authorize! :update, Depp::Domain
|
||||
@domain_params = params[:domain]
|
||||
# if emails_valid?
|
||||
@data = @domain.update(@domain_params)
|
||||
@dispute = Dispute.active.find_by(domain_name: @domain_params[:name])
|
||||
# end
|
||||
|
||||
if @data && response_ok?
|
||||
redirect_to info_registrar_domains_url(domain_name: @domain_params[:name])
|
||||
|
@ -180,11 +177,6 @@ class Registrar
|
|||
|
||||
private
|
||||
|
||||
# def emails_valid?
|
||||
# params_as_hash = @domain_params[:contacts_attributes].to_h
|
||||
# @emails_check_result = params_as_hash.all? { |_k, val| Contact.find_by(code: val[:code]).verify_email }
|
||||
# end
|
||||
|
||||
def init_domain
|
||||
@domain = Depp::Domain.new(current_user: depp_current_user)
|
||||
end
|
||||
|
|
|
@ -47,9 +47,6 @@ module Actions
|
|||
|
||||
contact_code = params[:registrant][:code]
|
||||
contact = Contact.find_by_code(contact_code)
|
||||
p ">>>>>>>>>"
|
||||
p contact.email
|
||||
p ">>>>>>>>>>>>"
|
||||
validate_email(contact.email)
|
||||
|
||||
regt = Registrant.find_by(code: params[:registrant][:code])
|
||||
|
@ -128,7 +125,7 @@ module Actions
|
|||
end
|
||||
|
||||
def validate_email(email)
|
||||
return if Rails.env.test?
|
||||
return true if Rails.env.test?
|
||||
|
||||
[:regex, :mx].each do |m|
|
||||
result = Actions::SimpleMailValidator.run(email: email, level: m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue