From df6645c9ab218b392a0b1f18b65111178cec9128 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 21 Jul 2021 18:29:51 +0545 Subject: [PATCH] depricate project name --- app/config/collections2.php | 11 ----------- app/controllers/api/projects.php | 4 +--- app/init.php | 1 - app/views/console/comps/header.phtml | 4 ++-- src/Appwrite/Utopia/Response/Model/Project.php | 6 ------ 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/app/config/collections2.php b/app/config/collections2.php index 20cff4c39..45522a9e0 100644 --- a/app/config/collections2.php +++ b/app/config/collections2.php @@ -23,17 +23,6 @@ $collections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => 'name', - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 128, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => 'description', 'type' => Database::VAR_STRING, diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 8a85bcf13..409c3db05 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -35,7 +35,6 @@ App::post('/v1/projects') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, and underscore. Can\'t start with a leading underscore. Max length is 36 chars.') - ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('teamId', '', new UID(), 'Team unique ID.') ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) @@ -51,7 +50,7 @@ App::post('/v1/projects') ->inject('dbForInternal') ->inject('dbForExternal') ->inject('consoleDB') - ->action(function ($projectId, $name, $teamId, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $dbForConsole, $dbForInternal, $dbForExternal, $consoleDB) { + ->action(function ($projectId, $teamId, $description, $logo, $url, $legalName, $legalCountry, $legalState, $legalCity, $legalAddress, $legalTaxId, $response, $dbForConsole, $dbForInternal, $dbForExternal, $consoleDB) { /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Database $dbForConsole */ /** @var Utopia\Database\Database $dbForInternal */ @@ -70,7 +69,6 @@ App::post('/v1/projects') '$read' => ['team:' . $teamId], '$write' => ['team:' . $teamId . '/owner', 'team:' . $teamId . '/developer'], 'teamId' => $team->getId(), - 'name' => $name, 'description' => $description, 'logo' => $logo, 'url' => $url, diff --git a/app/init.php b/app/init.php index 854a938dc..2e5672533 100644 --- a/app/init.php +++ b/app/init.php @@ -543,7 +543,6 @@ App::setResource('console', function() { return new Document2([ '$id' => 'console', '$collection' => 'projects', - 'name' => 'Appwrite', 'description' => 'Appwrite core engine', 'logo' => '', 'teamId' => -1, diff --git a/app/views/console/comps/header.phtml b/app/views/console/comps/header.phtml index 631e89f5c..d0232e609 100644 --- a/app/views/console/comps/header.phtml +++ b/app/views/console/comps/header.phtml @@ -212,8 +212,8 @@ data-analytics-label="Create Project">

Appwrite projects are containers for your resources and apps across different platforms.

- - + +