Merge remote-tracking branch 'origin/feat-list-endpoints-queries' into feat-variables-api
This commit is contained in:
commit
79eb351381
2 changed files with 6 additions and 6 deletions
|
@ -1979,9 +1979,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate queries
|
// Validate queries
|
||||||
$validator = new Documents($collection->getAttribute('attributes'), $collection->getAttribute('indexes'));
|
$queriesValidator = new Documents($collection->getAttribute('attributes'), $collection->getAttribute('indexes'));
|
||||||
$valid = $validator->isValid($queries);
|
$validQueries = $queriesValidator->isValid($queries);
|
||||||
if (!$valid) {
|
if (!$validQueries) {
|
||||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription());
|
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -984,7 +984,7 @@ trait UsersBase
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
], $this->getHeaders()), [
|
], $this->getHeaders()), [
|
||||||
'queries' => [ 'limit(1)' ]
|
'queries' => [ 'limit(1)' ],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals($logs['headers']['status-code'], 200);
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
@ -996,7 +996,7 @@ trait UsersBase
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
], $this->getHeaders()), [
|
], $this->getHeaders()), [
|
||||||
'queries' => [ 'offset(1)' ]
|
'queries' => [ 'offset(1)' ],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals($logs['headers']['status-code'], 200);
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
@ -1007,7 +1007,7 @@ trait UsersBase
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
], $this->getHeaders()), [
|
], $this->getHeaders()), [
|
||||||
'queries' => [ 'limit(1)', 'offset(1)' ]
|
'queries' => [ 'limit(1)', 'offset(1)' ],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals($logs['headers']['status-code'], 200);
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
|
Loading…
Reference in a new issue