From b7b0c8204acdce1920c3f86e4e4b974ab7576ae4 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Fri, 23 Aug 2019 00:00:18 +0300 Subject: [PATCH] Deperecated old collection rules --- app/config/collections.php | 18 ------------------ app/controllers/projects.php | 3 ++- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 796dc48f72..473e3db18a 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -700,15 +700,6 @@ return [ 'required' => true, 'array' => false, ], - [ - '$collection' => Database::SYSTEM_COLLECTION_RULES, - 'label' => 'Clients', - 'key' => 'clients', - 'type' => 'url', - 'default' => '', - 'required' => false, - 'array' => true, - ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, 'label' => 'Legal Name', @@ -757,15 +748,6 @@ return [ 'default' => '', 'required' => false, ], - [ - '$collection' => Database::SYSTEM_COLLECTION_RULES, - 'label' => 'OAuth Callback', - 'key' => 'usersOauthCallback', // TODO Deprecate this - 'type' => 'url', - 'default' => '', - 'required' => false, - 'array' => false, - ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, 'label' => 'OAuth Bitbucket AppID', diff --git a/app/controllers/projects.php b/app/controllers/projects.php index d86d5ed268..ddb67e9e75 100644 --- a/app/controllers/projects.php +++ b/app/controllers/projects.php @@ -9,7 +9,6 @@ use Utopia\Validator\Text; use Utopia\Validator\WhiteList; use Utopia\Validator\Range; use Utopia\Validator\URL; -use Utopia\Validator\Domain; use Task\Validator\Cron; use Database\Database; use Database\Document; @@ -387,6 +386,8 @@ $utopia->delete('/v1/projects/:projectId') throw new Exception('Project not found', 404); } + // Delete all children (keys, webhooks, tasks [stop tasks?], platforms) + if(!$consoleDB->deleteDocument($projectId)) { throw new Exception('Failed to remove project from DB', 500); }