Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Feb 7, 2022
1 parent 59ad857 commit aecbabc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions teams_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ func (api *API) ListTeamsDevices(ctx context.Context, accountID string) ([]Teams
return response.Result, nil
}

// RevokeTeamsDevice revokes device with given identifiers
// RevokeTeamsDevice revokes device with given identifiers.
//
// API reference : https://api.cloudflare.com/#devices-revoke-devices
func (api *API) RevokeTeamsDevices(ctx context.Context, accountID string, deviceIds []string) (Response, error) {
uri := fmt.Sprintf("/%s/%s/devices/revoke", AccountRouteRoot, accountID)

res, err := api.makeRequestContextWithHeaders(ctx, http.MethodPost, uri, deviceIds, http.Header{"Content-Type": []string{"application/json"}})
res, err := api.makeRequestContextWithHeaders(ctx, http.MethodPost, uri, deviceIds)
if err != nil {
return Response{}, err
}
Expand All @@ -84,7 +84,7 @@ func (api *API) RevokeTeamsDevices(ctx context.Context, accountID string, device
return result, err
}

// GetTeamsDeviceDetails gets device details
// GetTeamsDeviceDetails gets device details.
//
// API reference : https://api.cloudflare.com/#devices-device-details
func (api *API) GetTeamsDeviceDetails(ctx context.Context, accountID string, deviceID string) (TeamsDeviceListItem, error) {
Expand Down
2 changes: 1 addition & 1 deletion teams_devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestRevokeTeamsDevices(t *testing.T) {
deviceIds := []string{"f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "g174e90a-fafe-4643-bbbc-4a0ed4fc8415"}

handler := func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodPost, r.Method, "Expected method 'Post', got %s", r.Method)
assert.Equal(t, http.MethodPost, r.Method, "Expected method 'POST', got %s", r.Method)
w.Header().Set("content-type", "application/json")
fmt.Fprintf(w, `{
"result": null,
Expand Down

0 comments on commit aecbabc

Please sign in to comment.