From 47352e4062ae093f7d7baa37dfee5fe4ddbb38bb Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 13 Aug 2023 14:05:20 +0300 Subject: [PATCH] composer.lock --- .env | 2 +- src/Appwrite/Platform/Tasks/Restore.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index fe92d96822..4ba7317f1f 100644 --- a/.env +++ b/.env @@ -34,7 +34,7 @@ _APP_CONNECTIONS_CACHE=redis_fra1_01=redis://redis:6379 _APP_CONNECTIONS_QUEUE=redis_fra1_01=redis://redis:6379 _APP_CONNECTIONS_PUBSUB=redis_fra1_01=redis://redis:6379 _APP_CONNECTIONS_STORAGE=local://localhost -_APP_CONNECTIONS_BACKUPS_STORAGE=dospaces://DO00QM68PV7HQD77DQVF:l2Zh7eH5aoMKgEe3h71jD9nxzULvdrRtkDTQUYkaES0@default/backups-v1?region=fra1 +_APP_CONNECTIONS_BACKUPS_STORAGE=dospaces://DO00ZRRREABHAPV7MTRV:IhXnSpm49Pi+lSSiM2Q5R7WEE8Xn5dabRqCJAyXT2Yk@default/backups-v1?region=fra1 _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 diff --git a/src/Appwrite/Platform/Tasks/Restore.php b/src/Appwrite/Platform/Tasks/Restore.php index 6904d83b58..96fa81e5ca 100644 --- a/src/Appwrite/Platform/Tasks/Restore.php +++ b/src/Appwrite/Platform/Tasks/Restore.php @@ -10,8 +10,8 @@ use Utopia\CLI\Console; use Utopia\Storage\Device; use Utopia\Storage\Device\DOSpaces; use Utopia\Storage\Device\Local; +use Utopia\Validator\Boolean; use Utopia\Validator\Text; -use Utopia\Validator\WhiteList; class Restore extends Action { @@ -32,7 +32,7 @@ class Restore extends Action $this ->desc('Restore a DB') ->param('id', '', new Text(20), 'The backup identification') - ->param('cloud', null, new WhiteList(['true', 'false'], true), 'Download backup from cloud or use local directory') + ->param('cloud', null, new Boolean(true), 'Download backup from cloud or use local directory') ->param('database', null, new Text(10), 'The Database name for example db_fra1_01') ->callback(fn ($id, $cloud, $project) => $this->action($id, $cloud, $project)); } @@ -74,7 +74,7 @@ class Restore extends Action $filename = $id . '.tar.gz'; $start = microtime(true); - $cloud = $cloud === 'true'; + $cloud = $cloud === 'true' || $cloud === '1'; if ($cloud) { $local = new Local(self::BACKUPS_PATH . '/downloads/' . $id);