mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update constants
This commit is contained in:
@@ -204,7 +204,7 @@ App::post('/v1/migrations/appwrite')
|
||||
'status' => 'pending',
|
||||
'stage' => 'init',
|
||||
'source' => json_encode([
|
||||
'type' => 'appwrite',
|
||||
'type' => Appwrite::getName(),
|
||||
'endpoint' => $endpoint,
|
||||
'projectId' => $projectId,
|
||||
'apiKey' => $apiKey,
|
||||
@@ -288,7 +288,7 @@ App::post('/v1/migrations/firebase')
|
||||
'status' => 'pending',
|
||||
'stage' => 'init',
|
||||
'source' => json_encode([
|
||||
'type' => 'firebase',
|
||||
'type' => Firebase::getName(),
|
||||
'serviceAccount' => $serviceAccount,
|
||||
]),
|
||||
'resources' => $resources,
|
||||
@@ -376,7 +376,7 @@ App::post('/v1/migrations/supabase')
|
||||
'status' => 'pending',
|
||||
'stage' => 'init',
|
||||
'source' => json_encode([
|
||||
'type' => 'supabase',
|
||||
'type' => Supabase::getName(),,
|
||||
'endpoint' => $endpoint,
|
||||
'apiKey' => $apiKey,
|
||||
'databaseHost' => $databaseHost,
|
||||
@@ -473,7 +473,7 @@ App::post('/v1/migrations/nhost')
|
||||
'status' => 'pending',
|
||||
'stage' => 'init',
|
||||
'source' => json_encode([
|
||||
'type' => 'nhost',
|
||||
'type' => NHost::getName(),,
|
||||
'subdomain' => $subdomain,
|
||||
'region' => $region,
|
||||
'adminSecret' => $adminSecret,
|
||||
|
||||
@@ -78,12 +78,12 @@ class MigrationsV1 extends Worker
|
||||
protected function processSource(array $source): Source
|
||||
{
|
||||
switch ($source['type']) {
|
||||
case 'firebase':
|
||||
case Firebase::getName():
|
||||
return new Firebase(
|
||||
json_decode($source['serviceAccount'], true),
|
||||
);
|
||||
break;
|
||||
case 'supabase':
|
||||
case Supabase::getName():
|
||||
return new Supabase(
|
||||
$source['endpoint'],
|
||||
$source['apiKey'],
|
||||
@@ -94,7 +94,7 @@ class MigrationsV1 extends Worker
|
||||
$source['port'],
|
||||
);
|
||||
break;
|
||||
case 'nhost':
|
||||
case NHost::getName():
|
||||
return new NHost(
|
||||
$source['subdomain'],
|
||||
$source['region'],
|
||||
@@ -105,7 +105,7 @@ class MigrationsV1 extends Worker
|
||||
$source['port'],
|
||||
);
|
||||
break;
|
||||
case 'appwrite':
|
||||
case Appwrite::getName():
|
||||
return new Appwrite($source['projectId'], str_starts_with($source['endpoint'], 'http://localhost/v1') ? 'http://appwrite/v1' : $source['endpoint'], $source['apiKey']);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user