Skip to content

Commit 376d924

Browse files
authored
Merge pull request #514 from Plaenkler/507-support-hetzner-dns-update
fixed Correct hetznerBaseURL and updateRecord URL construction
2 parents 089309d + dc7f8fc commit 376d924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ddns/providers/hetzner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
const (
15-
hetznerBaseURL = "https://dns.hetzner.com/api/v1/records/"
15+
hetznerBaseURL = "https://dns.hetzner.com/api/v1/records"
1616
contentType = "Content-Type"
1717
contentTypeJSON = "application/json"
1818
headerAuthToken = "Auth-API-Token"
@@ -75,7 +75,7 @@ func (c *client) updateRecord(record *Record) error {
7575
if err != nil {
7676
return fmt.Errorf("marshal update: %w", err)
7777
}
78-
url := hetznerBaseURL + record.ID
78+
url := hetznerBaseURL + "/" + record.ID
7979
body, err := c.fetch(http.MethodPut, url, data)
8080
if err != nil {
8181
return err

0 commit comments

Comments
 (0)