1
0
Fork 0
mirror of synced 2024-09-20 19:42:42 +12:00
appwrite/tests/resources/functions/php-scopes/index.php

17 lines
428 B
PHP
Raw Normal View History

2024-05-06 23:27:28 +12:00
<?php
require 'vendor/autoload.php';
use Appwrite\Client;
use Appwrite\Services\Users;
return function ($context) {
$client = new Client();
$client
2024-05-09 23:50:45 +12:00
->setEndpoint(getenv('APPWRITE_FUNCTION_API_ENDPOINT'))
2024-05-06 23:27:28 +12:00
->setProject(getenv('APPWRITE_FUNCTION_PROJECT_ID'))
->setKey($context->req->headers['x-appwrite-key']);
$users = new Users($client);
return $context->res->json($users->list());
};