Fix deprecated method usage

This commit is contained in:
Jake Barnby
2025-05-19 01:56:25 +12:00
parent dd4ffa41af
commit 4307bb8b33
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -901,7 +901,7 @@ App::setResource('resourceToken', function ($project, $dbForProject, $request) {
$tokenJWT = $request->getParam('token');
if (!empty($tokenJWT) && !$project->isEmpty()) { // JWT authentication
$jwt = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway.
$jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway.
try {
$payload = $jwt->decode($tokenJWT);
@@ -8,6 +8,7 @@ use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideServer;
use Utopia\App;
use Utopia\Database\Query;
use Utopia\System\System;
class ProxyCustomServerTest extends Scope
{
@@ -328,7 +329,7 @@ class ProxyCustomServerTest extends Scope
public function testUpdateRule(): void
{
// Create function appwrite-network domain
$domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_FUNCTIONS');
$domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_FUNCTIONS');
$rule = $this->createAPIRule($domain);
$this->assertEquals(201, $rule['headers']['status-code']);
@@ -337,7 +338,7 @@ class ProxyCustomServerTest extends Scope
$this->cleanupRule($rule['body']['$id']);
// Create site appwrite-network domain
$domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_SITES');
$domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_SITES');
$rule = $this->createAPIRule($domain);
$this->assertEquals(201, $rule['headers']['status-code']);