Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh3341 committed Oct 23, 2023
1 parent 6f6652a commit d2c9dee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions php/sync-with-meilisearch/src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/utils.php');

use Appwrite\Client as AppwriteClient;
use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Query;
use MeiliSearch\Client;
use MeiliSearch\Client as MeiliSearch;

return function ($context) {
throw_if_missing($_ENV, [
Expand All @@ -31,17 +31,17 @@
]);
}

$appwriteClient = new AppwriteClient();
$appwriteClient
$client = new Client();
$client
->setEndpoint('https://cloud.appwrite.io/v1')
->setProject($_ENV['APPWRITE_PROJECT_ID'])
->setKey($_ENV['APPWRITE_API_KEY']);

$databases = new Databases($appwriteClient);
$databases = new Databases($client);

$meiliSearchClient = new Client($_ENV['MEILISEARCH_ENDPOINT'], $_ENV['MEILISEARCH_ADMIN_API_KEY']);
$meilisearch = new MeiliSearch($_ENV['MEILISEARCH_ENDPOINT'], $_ENV['MEILISEARCH_ADMIN_API_KEY']);

$index = $meiliSearchClient->index($_ENV['MEILISEARCH_INDEX_NAME']);
$index = $meilisearch->index($_ENV['MEILISEARCH_INDEX_NAME']);

$cursor = null;

Expand Down

0 comments on commit d2c9dee

Please sign in to comment.