mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix X-Appwrite-Response-Format
This commit is contained in:
@@ -3541,7 +3541,6 @@ trait DatabasesBase
|
||||
* Use specific X-Appwrite-Response-Format 1.8.0
|
||||
*/
|
||||
$response = $this->client->call(Client::METHOD_GET, $this->getRecordUrl($databaseId, $document[$this->getContainerIdResponseKey()]), array_merge([
|
||||
//$response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'X-Appwrite-Response-Format' => '1.8.0',
|
||||
|
||||
@@ -421,14 +421,21 @@ class ProjectsConsoleClientTest extends Scope
|
||||
], $this->getHeaders()), [
|
||||
'queries' => [
|
||||
'{"method":"select","values":["name", "$createdAt"]}',
|
||||
'{"method":"limit","values":[2]}',
|
||||
]
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $list['headers']['status-code']);
|
||||
$this->assertEquals(6, $list['body']['total']);
|
||||
$this->assertEquals(2, $list['body']['total']);
|
||||
|
||||
$project = $list['body']['projects'][0];
|
||||
|
||||
$this->assertEquals('Project Test', $project['name']);
|
||||
$this->assertArrayHasKey('$id', $project);
|
||||
$this->assertArrayHasKey('$sequence', $project);
|
||||
$this->assertArrayHasKey('$permissions', $project);
|
||||
$this->assertArrayHasKey('$createdAt', $project);
|
||||
$this->assertArrayHasKey('$updatedAt', $project);
|
||||
$this->assertArrayHasKey('name', $project);
|
||||
$this->assertArrayNotHasKey('platforms', $project);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user