Updated error when _APP_USAGE_STATS is disabled

for usage
This commit is contained in:
Bhaskar Singh committed 2023-03-18 22:12:36 +05:30
1 parent e8c74d7204
commit ac2085ffa8
8 files changed
+34 -1

No files matched your search

+3
View File
@@ -268,6 +268,9 @@ App::get('/v1/projects/:projectId/usage')
}
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
throw new Exception(Exception::GENERAL_USAGE_DISABLED);
}
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$periods = [
'24h' => [