Skip to content

Commit

Permalink
enabled -> enable
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 committed Aug 25, 2022
1 parent bc05dd2 commit 4bdba96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/1060.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
email_routing_settings: change enable endpoint from `enabled` to `enable`
```
2 changes: 1 addition & 1 deletion email_routing_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (api *API) EnableEmailRouting(ctx context.Context, rc *ResourceContainer) (
if rc.Identifier == "" {
return EmailRoutingSettings{}, ErrMissingZoneID
}
uri := fmt.Sprintf("/zones/%s/email/routing/enabled", rc.Identifier)
uri := fmt.Sprintf("/zones/%s/email/routing/enable", rc.Identifier)
res, err := api.makeRequestContext(ctx, http.MethodPost, uri, nil)
if err != nil {
return EmailRoutingSettings{}, err
Expand Down
2 changes: 1 addition & 1 deletion email_routing_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestEmailRouting_Enable(t *testing.T) {
setup()
defer teardown()

mux.HandleFunc("/zones/"+testZoneID+"/email/routing/enabled", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/zones/"+testZoneID+"/email/routing/enable", func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodPost, r.Method, "Expected method 'POST', got %s", r.Method)
w.Header().Set("content-type", "application/json")
fmt.Fprint(w, `{
Expand Down

0 comments on commit 4bdba96

Please sign in to comment.