Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to client.droplets.deleteByTag #34

Open
rjperrella opened this issue Mar 2, 2020 · 5 comments
Open

unable to client.droplets.deleteByTag #34

rjperrella opened this issue Mar 2, 2020 · 5 comments

Comments

@rjperrella
Copy link

rjperrella commented Mar 2, 2020

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.

@phillbaker
Copy link
Owner

phillbaker commented Mar 2, 2020 via email

@rjperrella
Copy link
Author

I don't call this API very often but it certainly used to work (say, a year ago?)

@rjperrella rjperrella reopened this Mar 2, 2020
@rjperrella
Copy link
Author

Sorry my bad - closed accidentally.

@Brostafa
Copy link
Contributor

Do you accept PRs?

@phillbaker
Copy link
Owner

Do you accept PRs?

Yup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants