Skip to content

Commit

Permalink
remove dedicated ZoneHoldDeleteResponse
Browse files Browse the repository at this point in the history
The response body is identical to other zone hold responses so let's reuse that instead.

Signed-off-by: Jacob Bednarz <jacob.bednarz@gmail.com>
  • Loading branch information
jacobbednarz committed Aug 10, 2023
1 parent c074f67 commit 54f1d9d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions zone_hold.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ type ZoneHoldResponse struct {
ResultInfo `json:"result_info"`
}

// ZoneHoldDeleteResponse represents a response from the Delete Zone Hold
// endpoint.
type ZoneHoldDeleteResponse struct {
Result ZoneHold `json:"result"`
}

// CreateZoneHoldParams represents params for the Create Zone Hold
// endpoint.
type CreateZoneHoldParams struct {
Expand Down Expand Up @@ -83,7 +77,7 @@ func (api *API) DeleteZoneHold(ctx context.Context, rc *ResourceContainer, param
return ZoneHold{}, err
}

response := &ZoneHoldDeleteResponse{}
response := &ZoneHoldResponse{}
err = json.Unmarshal(res, &response)
if err != nil {
return ZoneHold{}, fmt.Errorf("%s: %w", errUnmarshalError, err)
Expand Down

0 comments on commit 54f1d9d

Please sign in to comment.