mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
debug
This commit is contained in:
parent
4b740dce86
commit
d522b1a04c
1 changed files with 8 additions and 1 deletions
|
|
@ -563,7 +563,8 @@ App::get('/v1/databases')
|
|||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->action(function (array $queries, string $search, Response $response, Database $dbForProject) {
|
||||
->inject('project')
|
||||
->action(function (array $queries, string $search, Response $response, Database $dbForProject, Document $project) {
|
||||
$queries = Query::parseQueries($queries);
|
||||
|
||||
if (!empty($search)) {
|
||||
|
|
@ -597,6 +598,12 @@ App::get('/v1/databases')
|
|||
|
||||
$filterQueries = Query::groupByType($queries)['filters'];
|
||||
|
||||
var_dump([
|
||||
'projectId' => $project->getInternalId(),
|
||||
'queries' => $queries,
|
||||
'results' => $dbForProject->find('databases', $queries),
|
||||
]);
|
||||
|
||||
$response->dynamic(new Document([
|
||||
'databases' => $dbForProject->find('databases', $queries),
|
||||
'total' => $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT),
|
||||
|
|
|
|||
Loading…
Reference in a new issue