mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
empty $credentials
This commit is contained in:
parent
40dede6503
commit
644dcb8fb1
1 changed files with 7 additions and 2 deletions
|
|
@ -338,6 +338,9 @@ class Migrations extends Action
|
|||
throw new \Exception('_APP_MIGRATION_ENDPOINT env is empty');
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrite env
|
||||
*/
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$endpoint = $protocol . '://' . $platform['apiHostname'] . '/v1';
|
||||
|
||||
|
|
@ -346,8 +349,10 @@ class Migrations extends Action
|
|||
|
||||
if ($migration->getAttribute('source') === SourceAppwrite::getName()) {
|
||||
if (empty($credentials)) {
|
||||
$credentials['projectId'] = $credentials['projectId'] ?? $project->getId();
|
||||
$credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey;
|
||||
//$credentials['projectId'] = $credentials['projectId'] ?? $project->getId();
|
||||
//$credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey;
|
||||
$credentials['projectId'] = $project->getId();
|
||||
$credentials['apiKey'] = $tempAPIKey;
|
||||
$credentials['endpoint'] = $endpoint;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue