From b86b2e8430ef0731e17063fc0e6972006a86382f Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 22 Jul 2021 11:54:57 +0545 Subject: [PATCH] collection update name attribute --- app/controllers/api/database.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 1e160e81bb..127f721a42 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -139,13 +139,12 @@ App::put('/v1/database/collections/:collectionId') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_COLLECTION) ->param('collectionId', '', new UID(), 'Collection unique ID.') - ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') ->param('read', null, new Permissions(), 'An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true) ->param('write', null, new Permissions(), 'An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true) ->inject('response') ->inject('dbForExternal') ->inject('audits') - ->action(function ($collectionId, $name, $read, $write, $response, $dbForExternal, $audits) { + ->action(function ($collectionId, $read, $write, $response, $dbForExternal, $audits) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForExternal */ /** @var Appwrite\Event\Event $audits */ @@ -161,7 +160,6 @@ App::put('/v1/database/collections/:collectionId') try { $collection = $dbForExternal->updateDocument(Database::COLLECTIONS, $collection->getId(), new Document(\array_merge($collection->getArrayCopy(), [ - 'name' => $name, '$read' => $read, '$write' => $write ])));