diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 2589cc4c05..d9bf17e5ca 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -697,7 +697,6 @@ App::delete('/v1/databases/:databaseId') }); App::post('/v1/databases/:databaseId/collections') - ->alias('/v1/database/collections', ['databaseId' => 'default']) ->desc('Create Collection') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].create') diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index fbd4a55424..2a42ef6a2e 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1358,7 +1358,6 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') }); App::delete('/v1/storage/buckets/:bucketId/files/:fileId') - ->alias('/v1/storage/files/:fileId', ['bucketId' => 'default']) ->desc('Delete File') ->groups(['api', 'storage']) ->label('scope', 'files.write') diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index bd9443adec..40be90d635 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1231,62 +1231,6 @@ trait DatabasesBase return ['documents' => $documents['body']['documents'], 'databaseId' => $databaseId]; } - public function testCreateCollectionAlias(): array - { - // Create default database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'databaseId' => ID::custom('default'), - 'name' => 'Default' - ]); - - $this->assertNotEmpty($database['body']['$id']); - $this->assertEquals(201, $database['headers']['status-code']); - - /** - * Test for SUCCESS - */ - - $movies = $this->client->call(Client::METHOD_POST, '/database/collections', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'collectionId' => ID::unique(), - 'name' => 'Movies', - 'permissions' => [], - 'documentSecurity' => true, - ]); - - $this->assertEquals(201, $movies['headers']['status-code']); - $this->assertEquals('Movies', $movies['body']['name']); - - return ['moviesId' => $movies['body']['$id']]; - } - - /** - * @depends testCreateCollectionAlias - */ - public function testListDocumentsAlias(array $data): array - { - /** - * Test for SUCCESS - */ - - $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(0, $documents['body']['total']); - - return []; - } - /** * @depends testListDocuments */ diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index 9a2adb9856..35f2da56d5 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -765,13 +765,6 @@ trait StorageBase $this->assertEquals(204, $file['headers']['status-code']); $this->assertEmpty($file['body']); - $file = $this->client->call(Client::METHOD_GET, '/storage/files/' . $data['fileId'], array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - - $this->assertEquals(404, $file['headers']['status-code']); - return $data; } }