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

Bug: Decimal fields are typed as "number" when in reality a formatted string is returned #8

Open
josias-r opened this issue Jul 1, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@josias-r
Copy link

josias-r commented Jul 1, 2024

Description of the bug

When a field in directus is set to type "decimal" (for finances for example), the generated types say the response is a number, when in reality it is a formatted string, such as "100.00"

Steps To Reproduce

No response

Additional Information

No response

@josias-r josias-r added the bug Something isn't working label Jul 1, 2024
@WoLfulus
Copy link
Member

WoLfulus commented Jul 1, 2024

Which database you're using?

@josias-r
Copy link
Author

josias-r commented Jul 2, 2024

@WoLfulus PostgreSQL v15 hosted on Vercel, Directus 10.10.4

const config = await directusClient.shop_item({
  fields: [
    { column_name: ["current_price"] },
  ],
});

image

@WoLfulus
Copy link
Member

I'll be looking into this one soon

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

No branches or pull requests

2 participants