cleanup
This commit is contained in:
parent
489cfbf0f1
commit
06786481f1
|
@ -4,16 +4,6 @@ require_once 'vendor/autoload.php';
|
|||
use Appwrite\Client;
|
||||
|
||||
// You can remove imports of services you don't use
|
||||
use Appwrite\Services\Account;
|
||||
// use Appwrite\Services\Avatars;
|
||||
use Appwrite\Services\Databases;
|
||||
// use Appwrite\Services\Functions;
|
||||
// use Appwrite\Services\Health;
|
||||
// use Appwrite\Services\Locale;
|
||||
// use Appwrite\Services\Storage;
|
||||
// use Appwrite\Services\Teams;
|
||||
use Appwrite\Services\Users;
|
||||
use Appwrite\Query;
|
||||
|
||||
// ini_set('display_errors', 1);
|
||||
// ini_set('display_startup_errors', 1);
|
||||
|
@ -38,19 +28,6 @@ include 'redirect_code.php';
|
|||
return function($req, $res) {
|
||||
$client = new Client();
|
||||
|
||||
// You can remove services you don't use
|
||||
$account = new Account($client);
|
||||
// $avatars = new Avatars($client);
|
||||
$database = new Databases($client);
|
||||
// $functions = new Functions($client);
|
||||
// $health = new Health($client);
|
||||
// $locale = new Locale($client);
|
||||
// $storage = new Storage($client);
|
||||
// $teams = new Teams($client);
|
||||
$users = new Users($client);
|
||||
|
||||
$query = new Appwrite\Query;
|
||||
|
||||
if(!$req['variables']['APPWRITE_FUNCTION_ENDPOINT'] || !$req['variables']['APPWRITE_FUNCTION_API_KEY']) {
|
||||
echo('Environment variables are not set. Function cannot use Appwrite SDK.');
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue