1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

Use $loose = true for number param validators to allow passing strings as required by SDK's

This commit is contained in:
Jake Barnby 2022-01-18 23:47:30 +13:00
parent 11b0967d3b
commit 2b82148591

View file

@ -943,9 +943,9 @@ App::post('/v1/database/collections/:collectionId/attributes/integer')
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true)
->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true)
->param('default', null, new Integer(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
->param('min', null, new Integer(true), 'Minimum value to enforce on new documents', true)
->param('max', null, new Integer(true), 'Maximum value to enforce on new documents', true)
->param('default', null, new Integer(true), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
->param('array', false, new Boolean(), 'Is attribute an array?', true)
->inject('response')
->inject('dbForProject')
@ -1014,9 +1014,9 @@ App::post('/v1/database/collections/:collectionId/attributes/float')
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true)
->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true)
->param('default', null, new FloatValidator(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
->param('min', null, new FloatValidator(true), 'Minimum value to enforce on new documents', true)
->param('max', null, new FloatValidator(true), 'Maximum value to enforce on new documents', true)
->param('default', null, new FloatValidator(true), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true)
->param('array', false, new Boolean(), 'Is attribute an array?', true)
->inject('response')
->inject('dbForProject')