Refactor usage init hook to remove unecessary
inject
This commit is contained in:
parent
3865f48d32
commit
7064f884aa
1 changed files with 2 additions and 3 deletions
|
@ -557,9 +557,8 @@ App::shutdown()
|
||||||
|
|
||||||
App::init()
|
App::init()
|
||||||
->groups(['usage'])
|
->groups(['usage'])
|
||||||
->inject('utopia')
|
->action(function () {
|
||||||
->action(function (App $utopia) {
|
if (App::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
|
||||||
if ($utopia::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
|
|
||||||
throw new Exception(Exception::GENERAL_USAGE_DISABLED);
|
throw new Exception(Exception::GENERAL_USAGE_DISABLED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue