mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Remove redundant database column domains.registered_at
Alias `Domain#registered_at` to `created_at` Closes #1442
This commit is contained in:
parent
bfa60a9c17
commit
41fee1d098
7 changed files with 16 additions and 7 deletions
|
@ -18,6 +18,7 @@ class Domain < ApplicationRecord
|
|||
alias_attribute :on_hold_time, :outzone_at
|
||||
alias_attribute :outzone_time, :outzone_at
|
||||
alias_attribute :auth_info, :transfer_code # Old attribute name; for PaperTrail
|
||||
alias_attribute :registered_at, :created_at
|
||||
|
||||
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
|
||||
# TODO: most inputs should be trimmed before validatation, probably some global logic?
|
||||
|
@ -627,7 +628,7 @@ class Domain < ApplicationRecord
|
|||
def as_json(_options)
|
||||
hash = super
|
||||
hash['auth_info'] = hash.delete('transfer_code') # API v1 requirement
|
||||
hash['valid_from'] = hash['registered_at'] # API v1 requirement
|
||||
hash['valid_from'] = hash['created_at'] # API v1 requirement
|
||||
hash.delete('statuses_before_force_delete')
|
||||
hash
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue