mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Check for domain dispute on create
This commit is contained in:
parent
928f96691c
commit
1dc2cf8e12
5 changed files with 41 additions and 4 deletions
|
@ -27,6 +27,10 @@ class Dispute < ApplicationRecord
|
|||
dispute.update(closed: true) if dispute.present?
|
||||
end
|
||||
|
||||
def self.valid_auth?(domain_name, password)
|
||||
Dispute.active.find_by(domain_name: domain_name, password: password).present?
|
||||
end
|
||||
|
||||
def set_expiry_date
|
||||
return if starts_at.blank?
|
||||
|
||||
|
@ -98,7 +102,6 @@ class Dispute < ApplicationRecord
|
|||
private
|
||||
|
||||
def validate_start_date
|
||||
puts 'EXECUTED'
|
||||
return if starts_at.nil?
|
||||
|
||||
errors.add(:starts_at, :past) if starts_at.past?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue