mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
remove extra vars
This commit is contained in:
parent
d89539b56a
commit
7da2bdf4da
1 changed files with 6 additions and 4 deletions
|
|
@ -224,16 +224,17 @@ class Migrations extends Action
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function processDestination(Document $migration, string $apiKey, string $endpoint): Destination
|
protected function processDestination(Document $migration): Destination
|
||||||
{
|
{
|
||||||
$destination = $migration->getAttribute('destination');
|
$destination = $migration->getAttribute('destination');
|
||||||
$options = $migration->getAttribute('options', []);
|
$options = $migration->getAttribute('options', []);
|
||||||
|
$credentials = $migration->getAttribute('credentials');
|
||||||
|
|
||||||
return match ($destination) {
|
return match ($destination) {
|
||||||
DestinationAppwrite::getName() => new DestinationAppwrite(
|
DestinationAppwrite::getName() => new DestinationAppwrite(
|
||||||
$this->project->getId(),
|
$this->project->getId(),
|
||||||
$endpoint,
|
$credentials['destinationEndpoint'],
|
||||||
$apiKey,
|
$credentials['destinationApiKey'],
|
||||||
$this->dbForProject,
|
$this->dbForProject,
|
||||||
Config::getParam('collections', [])['databases']['collections'],
|
Config::getParam('collections', [])['databases']['collections'],
|
||||||
),
|
),
|
||||||
|
|
@ -349,7 +350,8 @@ class Migrations extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($migration->getAttribute('destination') === DestinationAppwrite::getName()) {
|
if ($migration->getAttribute('destination') === DestinationAppwrite::getName()) {
|
||||||
|
$credentials['destinationApiKey'] = $tempAPIKey;
|
||||||
|
$credentials['destinationEndpoint'] = $endpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') {
|
if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue