1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Use new format param for attributes

This commit is contained in:
kodumbeats 2021-08-03 16:22:12 -04:00
parent 1766be331a
commit 1b0a59d14a
2 changed files with 3 additions and 2 deletions

View file

@ -266,7 +266,7 @@ App::post('/v1/database/collections/:collectionId/attributes')
$signed = true;
$filters = [];
$success = $dbForExternal->addAttributeInQueue($collectionId, $id, $type, $size, $required, $default, $signed, $array, $filters);
$success = $dbForExternal->addAttributeInQueue($collectionId, $id, $type, $size, $required, $default, $signed, $array, /*format*/ null, $filters);
// Database->addAttributeInQueue() does not return a document
// So we need to create one for the response

View file

@ -71,9 +71,10 @@ class DatabaseV1 extends Worker
$default = $attribute->getAttribute('default', null);
$signed = $attribute->getAttribute('signed', true);
$array = $attribute->getAttribute('array', false);
$format = $attribute->getAttribute('format', null);
$filters = $attribute->getAttribute('filters', []);
$success = $dbForExternal->createAttribute($collectionId, $id, $type, $size, $required, $default, $signed, $array, $filters);
$success = $dbForExternal->createAttribute($collectionId, $id, $type, $size, $required, $default, $signed, $array, $format, $filters);
if ($success) {
$removed = $dbForExternal->removeAttributeInQueue($collectionId, $id);
}