Skip to content

Commit

Permalink
remove hardcoded block domain handle
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Oct 21, 2024
1 parent 523cd6c commit a3bbd80
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions app/models/whois_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,12 @@ def tech_contacts
json['tech_contacts'].map { |serialized_contact| deserialize_contact(serialized_contact) }
end

def status
if blocked_domains.include?(domain_name)
["Blocked"]
else
# Логика для получения статуса из базы данных или WHOIS
json['status'] || []
end
end

private

# rubocop:disable Metrics/AbcSize
def deserialize_domain
Domain.new(name: json['name'],
statuses: blocked_domains.include?(json['name']) ? ["Blocked"] : json['status'],
statuses: json['status'],
registered: json['registered'],
changed: json['changed'],
expire: json['expire'],
Expand Down Expand Up @@ -102,8 +93,4 @@ def partial_for_private_person(authorized)
'legal_person'
end
end

def blocked_domains
%w[com.ee fie.ee med.ee pri.ee]
end
end

0 comments on commit a3bbd80

Please sign in to comment.