Skip to content

Commit

Permalink
review: fix delete record
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Nov 18, 2024
1 parent e5e3087 commit 283f9f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions providers/dns/rainyun/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ func (c *Client) AddRecord(ctx context.Context, domainID int, record Record) err
func (c *Client) DeleteRecord(ctx context.Context, domainID, recordID int) error {
endpoint := c.baseURL.JoinPath("domain", strconv.Itoa(domainID), "dns")

query := endpoint.Query()
query.Set("record_id", strconv.Itoa(recordID))
endpoint.RawQuery = query.Encode()

req, err := newJSONRequest(ctx, http.MethodDelete, endpoint, nil)
req, err := newJSONRequest(ctx, http.MethodDelete, endpoint, Record{ID: recordID})
if err != nil {
return err
}
Expand Down

0 comments on commit 283f9f0

Please sign in to comment.