From 13b25af2568740fccccbe3fd4aaafafc764d6706 Mon Sep 17 00:00:00 2001 From: Harrison Jones Date: Thu, 16 Apr 2026 10:00:50 -0400 Subject: [PATCH] Update unifi.go - Support "auto" TTL A TTLSeconds of `0` is valid within Unifi and represents "auto". --- internal/unifi/unifi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/unifi/unifi.go b/internal/unifi/unifi.go index 22cbc9d..019e4e2 100644 --- a/internal/unifi/unifi.go +++ b/internal/unifi/unifi.go @@ -213,7 +213,7 @@ type DNSPolicy struct { ID string `json:"id,omitempty"` Enabled bool `json:"enabled"` Domain string `json:"domain"` - TTLSeconds int32 `json:"ttlSeconds,omitempty"` + TTLSeconds int32 `json:"ttlSeconds"` // This must not be "omitempty" as 0 maps to "auto" for Unifi. // Address record fields (A_RECORD, AAAA_RECORD) IPv4Address string `json:"ipv4Address,omitempty"`