diff --git a/app/models/whois_record.rb b/app/models/whois_record.rb index 047aee84..65e2f084 100644 --- a/app/models/whois_record.rb +++ b/app/models/whois_record.rb @@ -37,6 +37,15 @@ 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 @@ -93,4 +102,8 @@ def partial_for_private_person(authorized) 'legal_person' end end + + def blocked_domains + %w[com.ee fie.ee med.ee pri.ee] + end end