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