From 3800ccee1d62dbd2bb94352e39e32c583e193d7b Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 8 Aug 2024 19:46:44 +0300 Subject: [PATCH] credentials --- src/Appwrite/Platform/Workers/Migrations.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 4fbc83d8e8..7cad7f8b5e 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -268,6 +268,13 @@ class Migrations extends Action $project = $this->project; $projectDocument = $this->dbForConsole->getDocument('projects', $project->getId()); $tempAPIKey = $this->generateAPIKey($projectDocument); + + $this->credentials = [ + 'projectId' => $projectDocument->getId(), + 'endpoint' => 'http://appwrite/v1', + 'apiKey' => $tempAPIKey['secret'], + ]; + $transfer = $source = $destination = null; try { @@ -279,19 +286,6 @@ class Migrations extends Action $log->addTag('type', $migration->getAttribute('source')); -// if ( -// $migration->getAttribute('source') === SourceAppwrite::getName() || -// $migration->getAttribute('destination') === DestinationAppwrite::getName() -// ) { -// $migration->setAttribute('credentials', ); -// } - - $this->credentials = [ - 'projectId' => $projectDocument->getId(), - 'endpoint' => 'http://appwrite/v1', - 'apiKey' => $tempAPIKey['secret'], - ]; - $source = $this->processSource($migration); $destination = $this->processDestination($migration);