indirectus icon indicating copy to clipboard operation
indirectus copied to clipboard

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

Open josias-r opened this issue 1 year ago • 3 comments

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 avatar Jul 01 '24 21:07 josias-r

Which database you're using?

WoLfulus avatar Jul 01 '24 23:07 WoLfulus

@WoLfulus PostgreSQL v15 hosted on Vercel, Directus 10.10.4

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

image

josias-r avatar Jul 02 '24 14:07 josias-r

I'll be looking into this one soon

WoLfulus avatar Aug 16 '24 20:08 WoLfulus