feat: remove domains whose zones vanished at the provider on import
This commit is contained in:
@@ -79,6 +79,14 @@ func toDomainResponse(d store.Domain) domainResponse {
|
||||
return resp
|
||||
}
|
||||
|
||||
// importResponse splits an import into what appeared and what vanished at
|
||||
// the provider. Both slices are initialised so they marshal as [] and never
|
||||
// as null — clients call .length/.map on them.
|
||||
type importResponse struct {
|
||||
Created []domainResponse `json:"created"`
|
||||
Removed []domainResponse `json:"removed"`
|
||||
}
|
||||
|
||||
// parseOptionalUUID parses s (may be nil/empty) into *uuid.UUID; returns ok=false on invalid input.
|
||||
func parseOptionalUUID(s *string) (*uuid.UUID, bool) {
|
||||
if s == nil || *s == "" {
|
||||
|
||||
Reference in New Issue
Block a user