mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
remove default value
This commit is contained in:
parent
6d232ddbcf
commit
95f4e7858b
4 changed files with 3 additions and 12 deletions
|
@ -5,7 +5,7 @@ module Actions
|
|||
def initialize(email:, validation_eventable:, check_level: nil)
|
||||
@email = email
|
||||
@validation_eventable = validation_eventable
|
||||
@check_level = check_level || :regex
|
||||
@check_level = check_level || :mx
|
||||
end
|
||||
|
||||
def call
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class VerifyEmailsJob < ApplicationJob
|
||||
discard_on StandardError
|
||||
|
||||
def perform(contact:, check_level: 'regex')
|
||||
def perform(contact:, check_level: 'mx')
|
||||
contact_not_found(contact.id) unless contact
|
||||
validate_check_level(check_level)
|
||||
action = Actions::EmailCheck.new(email: contact.email,
|
||||
|
|
|
@ -71,14 +71,5 @@ class ValidationEvent < ApplicationRecord
|
|||
end
|
||||
|
||||
def lift_force_delete
|
||||
domain_contacts = Contact.where(email: email).map(&:domain_contacts).flatten
|
||||
registrant_ids = Registrant.where(email: email).pluck(:id)
|
||||
|
||||
domains = domain_contacts.map(&:domain).flatten +
|
||||
Domain.where(registrant_id: registrant_ids)
|
||||
|
||||
domains.each do |domain|
|
||||
Domains::ForceDeleteLift::Base.run(domain: domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace :verify_email do
|
|||
SPAM_PROTECT_TIMEOUT = 30.seconds
|
||||
options = {
|
||||
domain_name: nil,
|
||||
check_level: 'regex',
|
||||
check_level: 'mx',
|
||||
spam_protect: false,
|
||||
}
|
||||
banner = 'Usage: rake verify_email:check_all -- [options]'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue