Skip to content

unable to client.droplets.deleteByTag #34

Description

@rjperrella

Hi,
I've used this package for years and I love it. Recently, however, it appears that client.droplets.deleteByTag() doesn't work. When I put a debug statement (console.log) in client.js, in _makeRequestWithBody, I can see that it builds this object:
{ uri: 'https://api.digitalocean.com/v2/droplets',
method: 'DELETE',
headers:
{ Authorization:
'Bearer bla bla bla' },
body: '{"tag_name":"GH"}' }

In the DigitalOcean API docs I see:
To delete Droplets by a tag (for example awesome), send a DELETE request to v2/droplets?tag_name=$TAG_NAME.

So, If I understand the DigitalOcean API correctly, I think the tag_name needs to be part of the URI, not part of the body. However, I'm not sure how to correct this.
Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions