From e5c6233ff2d28b49850231cf16db6b7925b46ed2 Mon Sep 17 00:00:00 2001 From: Maksim Falaleev Date: Tue, 7 Jan 2025 16:57:53 +0300 Subject: [PATCH] fix default ttl (bad request 400 - Input should be greater than or equal to 60) --- helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers.go b/helpers.go index 4720e04..1a97415 100644 --- a/helpers.go +++ b/helpers.go @@ -134,6 +134,9 @@ func mapRecordsToLibds(zone string, records []Record) []libdns.Record { func libdnsToRecord(zone string, libdnsRecord libdns.Record) Record { // for TTL ttl := libdnsRecord.TTL.Seconds() + if ttl == 0 { + ttl = 60 + } // for Value recVals := strings.Split(libdnsRecord.Value, "\n")