Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

If the response is only a message, return the message object #12

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

mayorbyrne
Copy link
Contributor

Some methods in the pingdom API (modify check, delete check, etc) will only return an object that looks like

{
  "message":"Deletion of check was successful!"
}

Previously I was assuming each method returned a top-level field called "checks", "contacts", etc. And the response coming back from those methods was undefined. Added a check in to see if the response is only a message, and if so, just return the above object in that case.

bebraw added a commit that referenced this pull request Aug 18, 2015
If the response is only a message, return the message object
@bebraw bebraw merged commit b3871d7 into bebraw:master Aug 18, 2015
@bebraw
Copy link
Owner

bebraw commented Aug 18, 2015

Thanks. I published 0.7.0 with the change.

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

Successfully merging this pull request may close these issues.

None yet

2 participants