Use new format param for attributes
This commit is contained in:
parent
1766be331a
commit
1b0a59d14a
2 changed files with 3 additions and 2 deletions
|
@ -266,7 +266,7 @@ App::post('/v1/database/collections/:collectionId/attributes')
|
||||||
$signed = true;
|
$signed = true;
|
||||||
$filters = [];
|
$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
|
// Database->addAttributeInQueue() does not return a document
|
||||||
// So we need to create one for the response
|
// So we need to create one for the response
|
||||||
|
|
|
@ -71,9 +71,10 @@ class DatabaseV1 extends Worker
|
||||||
$default = $attribute->getAttribute('default', null);
|
$default = $attribute->getAttribute('default', null);
|
||||||
$signed = $attribute->getAttribute('signed', true);
|
$signed = $attribute->getAttribute('signed', true);
|
||||||
$array = $attribute->getAttribute('array', false);
|
$array = $attribute->getAttribute('array', false);
|
||||||
|
$format = $attribute->getAttribute('format', null);
|
||||||
$filters = $attribute->getAttribute('filters', []);
|
$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) {
|
if ($success) {
|
||||||
$removed = $dbForExternal->removeAttributeInQueue($collectionId, $id);
|
$removed = $dbForExternal->removeAttributeInQueue($collectionId, $id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue