Skip to content

Commit

Permalink
regru: update authentication method (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcaty authored Nov 8, 2024
1 parent 815c61a commit f8db554
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions providers/dns/regru/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,14 @@ func (c Client) AddTXTRecord(ctx context.Context, domain, subDomain, content str
func (c Client) doRequest(ctx context.Context, request any, fragments ...string) (*APIResponse, error) {
endpoint := c.baseURL.JoinPath(fragments...)

query := endpoint.Query()
query.Set("username", c.username)
query.Set("password", c.password)
endpoint.RawQuery = query.Encode()

inputData, err := json.Marshal(request)
if err != nil {
return nil, fmt.Errorf("failed to create input data: %w", err)
}

data := url.Values{}
data.Set("username", c.username)
data.Set("password", c.password)
data.Set("input_data", string(inputData))
data.Set("input_format", "json")

Expand Down

0 comments on commit f8db554

Please sign in to comment.