Output fulldomain with txt value

This commit is contained in:
tcely
2019-03-04 06:12:26 -05:00
committed by GitHub
parent 443fbb192a
commit 43de7ba39c

2
api.go
View File

@ -99,7 +99,7 @@ func webUpdatePost(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
} else {
log.WithFields(log.Fields{"subdomain": a.Subdomain, "txt": a.Value}).Debug("TXT updated")
updStatus = http.StatusOK
upd = []byte("{\"txt\": \"" + a.Value + "\"}")
upd = []byte("{\"txt\": \"" + a.Value + "\", \"fulldomain\": \"" + a.Subdomain + "." + Config.General.Domain + "\"}")
}
}
w.Header().Set("Content-Type", "application/json")