mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Use $loose = true for number param validators to allow passing strings as required by SDK's
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user