1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

Apply suggestions from code review

This commit is contained in:
Jake Barnby 2023-08-11 12:29:55 -04:00 committed by GitHub
parent 0304adf872
commit 7cd995ac3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View file

@ -16,10 +16,6 @@ class Attributes extends Base
'error'
];
public const PROHIBITED_QUERIES = [
Select::class
];
/**
* Expression constructor
*

View file

@ -338,7 +338,7 @@ trait DatabasesBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey'],
]), [
'queries' => ['select(key)'],
'queries' => ['select(["key"])'],
]);
$this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']);
$this->assertEquals(400, $response['headers']['status-code']);
@ -1095,7 +1095,7 @@ trait DatabasesBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey'],
]), [
'queries' => ['select(key)'],
'queries' => ['select(["key"])'],
]);
$this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']);
$this->assertEquals(400, $response['headers']['status-code']);