Updated error when _APP_USAGE_STATS is disabled

for usage
This commit is contained in:
Bhaskar Singh
2023-03-18 22:12:36 +05:30
parent e8c74d7204
commit ac2085ffa8
8 changed files with 34 additions and 1 deletions
+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' => [