diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index d8ecedab8..9480048e1 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -357,7 +357,7 @@ $utopia->post('/v1/database/collections/:collectionId/documents') ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.') ->param('parentDocument', '', function () { return new UID(); }, 'Parent document unique ID. Use when you want your new document to be a child of a parent document.', true) ->param('parentProperty', '', function () { return new Key(); }, 'Parent document property name. Use when you want your new document to be a child of a parent document.', true) - ->param('parentPropertyType', Document::SET_TYPE_ASSIGN, function () { return new WhiteList([Document::SET_TYPE_ASSIGN, Document::SET_TYPE_APPEND, Document::SET_TYPE_PREPEND]); }, 'Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.', true) + ->param('parentPropertyType', Document::SET_TYPE_ASSIGN, function () { return new WhiteList([Document::SET_TYPE_ASSIGN, Document::SET_TYPE_APPEND, Document::SET_TYPE_PREPEND]); }, 'Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. **append** or **prepend** should be set when the parent property is array. Use when you want your new document to be a child of a parent document.', true) ->action( function ($collectionId, $data, $read, $write, $parentDocument, $parentProperty, $parentPropertyType) use ($response, $projectDB, $webhook, $audit) { $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array diff --git a/src/Appwrite/Response/Result/Logs.php b/src/Appwrite/Response/Result/Log.php similarity index 96% rename from src/Appwrite/Response/Result/Logs.php rename to src/Appwrite/Response/Result/Log.php index 980534c19..c1a22a1d5 100644 --- a/src/Appwrite/Response/Result/Logs.php +++ b/src/Appwrite/Response/Result/Log.php @@ -5,7 +5,7 @@ namespace Appwrite\Response\Result; use Appwrite\Database\Database; use Appwrite\Response\Result; -class Logs extends Result +class Log extends Result { public function __construct() {