Move App::init to general.php
This commit is contained in:
parent
99666aa34e
commit
c7281af6e2
2 changed files with 10 additions and 9 deletions
|
@ -381,15 +381,6 @@ function updateAttribute(
|
|||
return $attribute;
|
||||
}
|
||||
|
||||
App::init()
|
||||
->groups(['database', 'function', 'storage', 'messaging'])
|
||||
->inject('project')
|
||||
->action(function (Document $project) {
|
||||
if ($project->getId() === 'console') {
|
||||
throw new Exception(Exception::PROJECT_RESERVED_PROJECT, 'Please check X-Appwrite-Project header');
|
||||
}
|
||||
});
|
||||
|
||||
App::init()
|
||||
->groups(['api', 'database'])
|
||||
->inject('request')
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once __DIR__ . '/../init.php';
|
|||
use Appwrite\Event\Certificate;
|
||||
use Appwrite\Event\Event;
|
||||
use Appwrite\Event\Usage;
|
||||
use Appwrite\Extend\Exception;
|
||||
use Appwrite\Extend\Exception as AppwriteException;
|
||||
use Appwrite\Network\Validator\Origin;
|
||||
use Appwrite\Utopia\Request;
|
||||
|
@ -357,6 +358,15 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
|
|||
return false;
|
||||
}
|
||||
|
||||
App::init()
|
||||
->groups(['database', 'function', 'storage', 'messaging'])
|
||||
->inject('project')
|
||||
->action(function (Document $project) {
|
||||
if ($project->getId() === 'console') {
|
||||
throw new Exception(Exception::PROJECT_RESERVED_PROJECT, 'Please check X-Appwrite-Project header');
|
||||
}
|
||||
});
|
||||
|
||||
App::init()
|
||||
->groups(['api', 'web'])
|
||||
->inject('utopia')
|
||||
|
|
Loading…
Reference in a new issue