mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 18:48:49 -04:00
fix(gandi.net): leave ttl as it is if not user specified
This commit is contained in:
@@ -126,17 +126,12 @@ func (p *Provider) Update(ctx context.Context, client *http.Client, ip netip.Add
|
||||
|
||||
buffer := bytes.NewBuffer(nil)
|
||||
encoder := json.NewEncoder(buffer)
|
||||
const defaultTTL uint32 = 3600
|
||||
ttl := defaultTTL
|
||||
if p.ttl != 0 {
|
||||
ttl = p.ttl
|
||||
}
|
||||
requestData := struct {
|
||||
Values [1]string `json:"rrset_values"`
|
||||
TTL uint32 `json:"rrset_ttl"`
|
||||
TTL uint32 `json:"rrset_ttl,omitempty"`
|
||||
}{
|
||||
Values: [1]string{ip.Unmap().String()},
|
||||
TTL: ttl,
|
||||
TTL: p.ttl,
|
||||
}
|
||||
err = encoder.Encode(requestData)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user