mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
REPP: Add renew exp_date sanity check
This commit is contained in:
parent
016c5e802c
commit
546330b178
7 changed files with 15 additions and 13 deletions
|
@ -29,6 +29,7 @@ module Deserializers
|
|||
{
|
||||
period: period.text.present? ? Integer(period.text) : 1,
|
||||
period_unit: period.first ? period.first[:unit] : 'y',
|
||||
exp_date: if_present('curExpDate'),
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ module Serializers
|
|||
@sponsored = sponsored
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def to_json(obj = domain)
|
||||
json = {
|
||||
name: obj.name, registrant: obj.registrant.code, created_at: obj.created_at,
|
||||
|
@ -19,6 +20,7 @@ module Serializers
|
|||
json[:transfer_code] = obj.auth_info if @sponsored
|
||||
json
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
def contacts
|
||||
domain.domain_contacts.map { |c| { code: c.contact_code_cache, type: c.type } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue