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

api/v1/components returns status as quoted string instead of integer #2058

Closed
3 tasks done
kholloway opened this issue Aug 15, 2016 · 1 comment
Closed
3 tasks done
Assignees
Milestone

Comments

@kholloway
Copy link

kholloway commented Aug 15, 2016

Before submitting your issue, please make sure that you've checked the checkboxes below.

  • I am running the latest release version of Cachet.
  • I am running at least PHP 5.5.9. You can check this by running php -v.
PHP 5.6.24
  • I have ran rm -rf bootstrap/cache/*.

Expected behaviour

Calls to /api/v1/components endpoint should return status code as integer in JSON.

Actual behaviour

Calls return status as a quoted string in JSON

Steps to reproduce

  1. Install/Configure Cachet v2.3.10
  2. Query /api/v1/components API endpoint
  3. See status returned as a quoted string

Example output from call to /api/v1/components/1

{
  "data": {
    "id": 1,
    "name": "Test component",
    "description": "",
    "link": "",
    "status": "3",
    "order": 0,
    "group_id": 1,
    "created_at": "2016-08-13 23:36:54",
    "updated_at": "2016-08-14 22:55:49",
    "deleted_at": null,
    "enabled": true,
    "status_name": "Partial Outage",
    "tags": {
      "": ""
    }
  }
}
@jbrooksuk jbrooksuk self-assigned this Aug 15, 2016
@jbrooksuk jbrooksuk added this to the V2.4.0 milestone Aug 15, 2016
@kholloway
Copy link
Author

Thanks for the super quick fix!

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

2 participants