Skip to content

Commit

Permalink
Fix Firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Jun 21, 2023
1 parent 9c8ccd8 commit 736a8f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions playground.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
// $_ENV['SOURCE_APPWRITE_TEST_KEY']
// );

// $firebase = json_decode($_ENV['FIREBASE_TEST_ACCOUNT'], true);
$firebase = json_decode($_ENV['FIREBASE_TEST_ACCOUNT'], true);

// $sourceFirebase = new Firebase(
// $firebase,
// $firebase['project_id'] ?? '',
// );
$sourceFirebase = new Firebase(
$firebase,
$firebase['project_id'] ?? '',
);

// $sourceNHost = new NHost(
// $_ENV['NHOST_TEST_SUBDOMAIN'] ?? '',
Expand Down Expand Up @@ -71,7 +71,7 @@
* Initialise Transfer Class
*/
$transfer = new Transfer(
$sourceSupabase,
$sourceFirebase,
$destinationLocal
);

Expand Down
2 changes: 1 addition & 1 deletion src/Transfer/Sources/Firebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ protected function exportGroupDatabases(int $batchSize, array $resources)

private function exportDB(int $batchSize, bool $pushDocuments, Database $database)
{
$baseURL = "https://firestore.googleapis.com/v1/{$this->projectID}/databases/(default)";
$baseURL = "https://firestore.googleapis.com/v1/projects/{$this->projectID}/databases/(default)/documents";

$nextPageToken = null;
$allCollections = [];
Expand Down

0 comments on commit 736a8f8

Please sign in to comment.