diff --git a/src/Appwrite/Utopia/Response/Model/Session.php b/src/Appwrite/Utopia/Response/Model/Session.php index 01cd23ee2..a0edfbb4b 100644 --- a/src/Appwrite/Utopia/Response/Model/Session.php +++ b/src/Appwrite/Utopia/Response/Model/Session.php @@ -18,6 +18,7 @@ class Session extends Model ->addRule('userId', [ 'type' => self::TYPE_STRING, 'description' => 'User ID.', + 'default' => '', 'example' => '5e5bb8c16897e', ]) ->addRule('expire', [ diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 38da1f50d..0ff7f39e8 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -18,8 +18,6 @@ class WebhooksCustomServerTest extends Scope */ public function testUpdateCollection($data): array { - var_dump($data); - exit(); /** * Test for SUCCESS */ @@ -110,7 +108,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($actors['headers']['status-code'], 201); $this->assertNotEmpty($actors['body']['$id']); - $actors = $this->client->call(Client::METHOD_DELETE, '/database/collections', array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/database/collections/'.$actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -135,7 +133,7 @@ class WebhooksCustomServerTest extends Scope $this->assertCount(1, $webhook['data']['$permissions']['write']); $this->assertCount(2, $webhook['data']['rules']); - return array_merge(['actorsId' => $actors['body']['$id']]); + return []; } public function testCreateUser():array