feat: new configuration system (and schema) (#2819)

This commit is contained in:
Adam Cooke
2024-02-26 12:41:57 +00:00
committed by GitHub
parent 1c5ff5a9a6
commit 0163ac3d10
77 changed files with 1840 additions and 593 deletions
+2 -2
View File
@@ -58,12 +58,12 @@ class TrackDomain < ApplicationRecord
if records.empty?
self.dns_status = "Missing"
self.dns_error = "There is no record at #{full_name}"
elsif records.size == 1 && records.first == Postal.config.dns.track_domain
elsif records.size == 1 && records.first == Postal::Config.dns.track_domain
self.dns_status = "OK"
self.dns_error = nil
else
self.dns_status = "Invalid"
self.dns_error = "There is a CNAME record at #{full_name} but it points to #{records.first} which is incorrect. It should point to #{Postal.config.dns.track_domain}."
self.dns_error = "There is a CNAME record at #{full_name} but it points to #{records.first} which is incorrect. It should point to #{Postal::Config.dns.track_domain}."
end
self.dns_checked_at = Time.now
save!