Skip to content

Commit

Permalink
chore: remove log json marshal debugs, print actual responses to console
Browse files Browse the repository at this point in the history
  • Loading branch information
kashalls committed May 24, 2024
1 parent 2130c42 commit f53b14d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dnsprovider/dnsprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,17 @@ func (c *Client) CreateRecord(record DNSRecord) (*DNSRecord, error) {
return nil, err
}

log.Debugf("json marshal: %v", record)

resp, err := c.ShipData(UnifiDNSRecords, body)
if err != nil {
return nil, err
}

log.Debugf("json marshal 2: %v", resp)

var newRecord DNSRecord
err = json.Unmarshal(resp, &newRecord)
if err != nil {
return nil, err
}

log.Debugf("json marshal 3: %v", newRecord)
return &newRecord, nil
}

Expand Down Expand Up @@ -290,6 +285,10 @@ func (p *DNSProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)
return nil, err
}

jsonData, _ := json.Marshal(records)
jsonString := string(jsonData)
fmt.Println(jsonString)

var endpoints []*endpoint.Endpoint
for _, record := range records {
endpoints = append(endpoints, &endpoint.Endpoint{
Expand Down

0 comments on commit f53b14d

Please sign in to comment.