mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
REFACTOR: Opinion: TXT records are one long string (#2631)
Co-authored-by: Costas Drogos <costas.drogos@gmail.com> Co-authored-by: imlonghao <git@imlonghao.com> Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl> Co-authored-by: Vincent Hagen <blackshadev@users.noreply.github.com>
This commit is contained in:
@ -478,7 +478,7 @@ func (client *providerClient) clearRequests(domain string) error {
|
||||
if cscDebug {
|
||||
printer.Printf("DEBUG: Clearing requests for %q\n", domain)
|
||||
}
|
||||
var bodyString, err = client.get("/zones/edits?filter=zoneName==" + domain)
|
||||
var bodyString, err = client.get(`/zones/edits?size=99999&filter=zoneName==` + domain)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -486,10 +486,12 @@ func (client *providerClient) clearRequests(domain string) error {
|
||||
var dr pagedZoneEditResponsePagedZoneEditResponse
|
||||
json.Unmarshal(bodyString, &dr)
|
||||
|
||||
// TODO(tlim): Properly handle paganation.
|
||||
if dr.Meta.Pages > 1 {
|
||||
return fmt.Errorf("cancelPendingEdits failed: Pages=%d", dr.Meta.Pages)
|
||||
}
|
||||
// TODO(tlim): Ignore what's beyond the first page.
|
||||
// It is unlikely that there are active jobs beyond the first page.
|
||||
// If there are, the next edit will just wait.
|
||||
//if dr.Meta.Pages > 1 {
|
||||
// return fmt.Errorf("cancelPendingEdits failed: Pages=%d", dr.Meta.Pages)
|
||||
//}
|
||||
|
||||
for i, ze := range dr.ZoneEdits {
|
||||
if cscDebug {
|
||||
|
Reference in New Issue
Block a user