1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Merge pull request #1514 from TorstenDittmann/fix-project-usage

fix(usage): use proper projectdb namespace
This commit is contained in:
Eldad A. Fux 2021-08-26 19:36:26 +03:00 committed by GitHub
commit 3004364a07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,