Skip to content

Commit

Permalink
fallback_domain: add ability to restore default domain list
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Jan 19, 2022
1 parent 5b3e676 commit 6639423
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions fallback_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,18 @@ func (api *API) UpdateFallbackDomain(ctx context.Context, accountID string, doma

return fallbackDomainResponse.Result, nil
}

// RestoreFallbackDomainDefaults resets the domain fallback values to the default
// list.
//
// API reference: TBA.
func (api *API) RestoreFallbackDomainDefaults(ctx context.Context, accountID string) error {
uri := fmt.Sprintf("/%s/%s/devices/policy/fallback_domains?reset_defaults=true", AccountRouteRoot, accountID)

_, err := api.makeRequestContext(ctx, http.MethodDelete, uri, []string{})
if err != nil {
return err
}

return nil
}

0 comments on commit 6639423

Please sign in to comment.