
Hi, Just a question...
I've set the AMOUNT attribute type as an intger in appwrite, why it accepts Strings ?
If i pass the number as String like this "5000" appwrite accepts it !!
TypeScript
'DatabaseId,
'CollectionId',
{
"AMOUNT": "50000"
}
);```
When using a function event to listen to any create and print the req.body the AMOUNT appears as String ?
Why the create document doesn't throw an error ?
TL;DR
Developers are wondering why the 'int' attribute in Appwrite is accepting numbers as a string. Even when passing a number as a string, such as "5000," Appwrite doesn't throw an error and accepts it. This behavior occurs when using a function event to listen to creations.
Solution: Appwrite is accepting numbers as strings due to how the Data API handles inputs. To ensure that the attribute is treated as an integer, developers should explicitly convert the string input to an integer before passing it to the 'AMOUNT' attribute.Recommended threads
- REQUEST
Good evening, anyone has an idea on how to pass body to appwrite function using POSTMAN? this is how I've passed it : { "providerName": "adamu" } and I ke...
- Domains cannot still be verified after 4...
I added a domain to my organization and changed the nameservers accordingly on my namecheap account. However after 4 days passed (way more than max 48hrs waitin...
- Appwrite Function get Execution ID
Is there a way to get the execution Id of the function's "own" execution inside the function? I couldn't find any environment variable for it [here](https://app...
