mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
fix issues
This commit is contained in:
parent
9766650ae4
commit
3b9ff74bd2
7 changed files with 66 additions and 14 deletions
|
@ -9,7 +9,7 @@ class Auction < ApplicationRecord
|
|||
domain_not_registered: 'domain_not_registered',
|
||||
}
|
||||
|
||||
enum platform: %i[blind english]
|
||||
enum platform: %i[automatically manually]
|
||||
|
||||
PENDING_STATUSES = [statuses[:started],
|
||||
statuses[:awaiting_payment],
|
||||
|
@ -21,6 +21,14 @@ class Auction < ApplicationRecord
|
|||
where(status: status) if status.present?
|
||||
}
|
||||
|
||||
scope :with_start_created_at_date, -> (start_created_at) {
|
||||
where("created_at >= ?", start_created_at) if start_created_at.present?
|
||||
}
|
||||
|
||||
scope :with_end_created_at_date, -> (end_created_at) {
|
||||
where("created_at <= ?", end_created_at) if end_created_at.present?
|
||||
}
|
||||
|
||||
def self.pending(domain_name)
|
||||
find_by(domain: domain_name.to_s, status: PENDING_STATUSES)
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@ module DNS
|
|||
def sell_at_auction
|
||||
auction = Auction.new
|
||||
auction.domain = name
|
||||
auction.platform = 'blind'
|
||||
auction.platform = 'automatically'
|
||||
auction.start
|
||||
ToStdout.msg "Created the auction: #{auction.inspect}"
|
||||
update_whois_from_auction(auction)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue