1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-27 19:43:24 +02:00

dnsmadeeasy: fix DeleteRecord (#1939)

This commit is contained in:
Ludovic Fernandez 2023-06-19 17:28:12 +02:00 committed by GitHub
parent 32b083e537
commit c900b49051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,7 @@ func (c *Client) GetRecords(ctx context.Context, domain *Domain, recordName, rec
query := endpoint.Query()
query.Set("recordName", recordName)
query.Set("type", recordType)
endpoint.RawQuery = query.Encode()
req, err := newJSONRequest(ctx, http.MethodGet, endpoint, nil)
if err != nil {
@ -113,7 +114,7 @@ func (c *Client) CreateRecord(ctx context.Context, domain *Domain, record *Recor
// DeleteRecord deletes a TXT records.
func (c *Client) DeleteRecord(ctx context.Context, record Record) error {
endpoint := c.BaseURL.JoinPath("/dns/managed", strconv.Itoa(record.SourceID), "records", strconv.Itoa(record.ID))
endpoint := c.BaseURL.JoinPath("dns", "managed", strconv.Itoa(record.SourceID), "records", strconv.Itoa(record.ID))
req, err := newJSONRequest(ctx, http.MethodDelete, endpoint, nil)
if err != nil {