From 23e75546f096be15261d404aed7205eb8922bcb7 Mon Sep 17 00:00:00 2001 From: Milan Jovanovic Date: Fri, 24 Jun 2022 23:23:43 +0200 Subject: [PATCH] Add ability to update root domain name --- datatypes/payload.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/datatypes/payload.go b/datatypes/payload.go index 44c018e..f72b3e0 100644 --- a/datatypes/payload.go +++ b/datatypes/payload.go @@ -1,6 +1,8 @@ package datatypes -import "os" +import ( + "os" +) // Payload wraps all required data to successfully execute a CF API DDNS A record update type Payload struct { @@ -17,6 +19,9 @@ type Payload struct { // FQDN returns the FQDN func (p Payload) FQDN() string { + if "@" == p.DNSRecord { + return p.Zone + } return p.DNSRecord + "." + p.Zone }