Merge pull request #1514 from TorstenDittmann/fix-project-usage
fix(usage): use proper projectdb namespace
This commit is contained in:
commit
3004364a07
1 changed files with 2 additions and 2 deletions
|
@ -190,6 +190,8 @@ App::get('/v1/projects/:projectId/usage')
|
|||
throw new Exception('Project not found', 404);
|
||||
}
|
||||
|
||||
$projectDB->setNamespace('app_'.$project->getId());
|
||||
|
||||
if(App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
|
||||
|
||||
$period = [
|
||||
|
@ -267,7 +269,6 @@ App::get('/v1/projects/:projectId/usage')
|
|||
|
||||
|
||||
// Users
|
||||
|
||||
$projectDB->getCollection([
|
||||
'limit' => 0,
|
||||
'offset' => 0,
|
||||
|
@ -279,7 +280,6 @@ App::get('/v1/projects/:projectId/usage')
|
|||
$usersTotal = $projectDB->getSum();
|
||||
|
||||
// Documents
|
||||
|
||||
$collections = $projectDB->getCollection([
|
||||
'limit' => 100,
|
||||
'offset' => 0,
|
||||
|
|
Loading…
Reference in a new issue