Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

API doesn't use datatype transformations on create return #186

Closed
rijkvanzanten opened this issue Jun 11, 2018 · 2 comments
Closed

API doesn't use datatype transformations on create return #186

rijkvanzanten opened this issue Jun 11, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rijkvanzanten
Copy link
Member

If I create a collection (POST /collections), the returned item (the one I just created) doesn't have it's values converted according to the datatypes:

// 😭 😱 ❌POST https://demo-api.directus.app/_/collections

{
  "data": {
    "collection": "rijks-test",
    "item_name_template": null,
    "preview_url": null,
    "hidden": "0", // ❌
    "translation": null,
    "single": "0", // ❌
    "note": null
  }
}

// 👌🏻 ✅🎉 GET https://demo-api.directus.app/_/collections/rijks-test

{
  "data": {
    "collection": "rijks-test",
    "item_name_template": null,
    "preview_url": null,
    "hidden": false, // ✅
    "translation": null,
    "single": false, // ✅
    "note": null
  }
}
@rijkvanzanten rijkvanzanten added the bug Something isn't working label Jun 11, 2018
@wellingguzman
Copy link
Contributor

I was unable to reproduce this issue. I will come back to this later.

@wellingguzman
Copy link
Contributor

The issue happens when the data type is set boolean.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants