jesus
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
- Issue with relations on database
I'm creating a food ordering website for businesses. I'm having issues with the relations on my database I attached the attributes for the collections I'm hav...
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems