mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
set credentials
This commit is contained in:
parent
1b82d32436
commit
ddb72c7546
1 changed files with 8 additions and 8 deletions
|
|
@ -337,22 +337,22 @@ class Migrations extends Action
|
|||
$endpoint = System::getEnv('_APP_MIGRATION_ENDPOINT');
|
||||
|
||||
try {
|
||||
if ($migration->getAttribute('source') === SourceAppwrite::getName()) {
|
||||
$credentials = $migration->getAttribute('credentials', []);
|
||||
$credentials = $migration->getAttribute('credentials', []);
|
||||
|
||||
if ($migration->getAttribute('source') === SourceAppwrite::getName()) {
|
||||
if (empty($credentials)) {
|
||||
$credentials['projectId'] = $project->getId();
|
||||
$credentials['apiKey'] = $tempAPIKey;
|
||||
$credentials['endpoint'] = $endpoint;
|
||||
}
|
||||
|
||||
if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') {
|
||||
$credentials['endpoint'] = $endpoint;
|
||||
}
|
||||
|
||||
$migration->setAttribute('credentials', $credentials);
|
||||
}
|
||||
|
||||
if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') {
|
||||
$credentials['endpoint'] = $endpoint;
|
||||
}
|
||||
|
||||
$migration->setAttribute('credentials', $credentials);
|
||||
|
||||
$migration->setAttribute('stage', 'processing');
|
||||
$migration->setAttribute('status', 'processing');
|
||||
$this->updateMigrationDocument($migration, $project, $queueForRealtime);
|
||||
|
|
|
|||
Loading…
Reference in a new issue