Merge pull request #450 from appwrite/remove-multiple-includes
Unified include calls
This commit is contained in:
commit
2af82d0fe4
11 changed files with 3 additions and 20 deletions
|
@ -426,6 +426,9 @@ $utopia->get('/.well-known/acme-challenge')
|
|||
}
|
||||
);
|
||||
|
||||
include_once __DIR__ . '/controllers/shared/api.php';
|
||||
include_once __DIR__ . '/controllers/shared/web.php';
|
||||
|
||||
foreach($services as $key => $service) {
|
||||
include_once $services[$key]['controller'];
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ use DeviceDetector\DeviceDetector;
|
|||
use GeoIp2\Database\Reader;
|
||||
use Utopia\Validator\ArrayList;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$oauthDefaultSuccess = $request->getServer('_APP_HOME').'/auth/oauth2/success';
|
||||
$oauthDefaultFailure = $request->getServer('_APP_HOME').'/auth/oauth2/failure';
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ use BaconQrCode\Writer;
|
|||
use Utopia\Config\Config;
|
||||
use Utopia\Validator\HexColor;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$types = [
|
||||
'browsers' => include __DIR__.'/../../config/avatars/browsers.php',
|
||||
'credit-cards' => include __DIR__.'/../../config/avatars/credit-cards.php',
|
||||
|
|
|
@ -25,8 +25,6 @@ use Appwrite\Database\Exception\Structure as StructureException;
|
|||
use DeviceDetector\DeviceDetector;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->post('/v1/database/collections')
|
||||
->desc('Create Collection')
|
||||
->groups(['api', 'database'])
|
||||
|
|
|
@ -6,8 +6,6 @@ use Utopia\App;
|
|||
use Utopia\Locale\Locale;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/locale')
|
||||
->desc('Get User Locale')
|
||||
->groups(['api', 'locale'])
|
||||
|
|
|
@ -21,8 +21,6 @@ use Appwrite\OpenSSL\OpenSSL;
|
|||
use Appwrite\Network\Validator\CNAME;
|
||||
use Cron\CronExpression;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$scopes = include __DIR__.'/../../../app/config/scopes.php';
|
||||
|
||||
$utopia->post('/v1/projects')
|
||||
|
|
|
@ -23,8 +23,6 @@ use Appwrite\Storage\Compression\Algorithms\GZIP;
|
|||
use Appwrite\Resize\Resize;
|
||||
use Appwrite\OpenSSL\OpenSSL;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
Storage::addDevice('local', new Local(APP_STORAGE_UPLOADS.'/app-'.$project->getId()));
|
||||
|
||||
$fileLogos = [ // Based on this list @see http://stackoverflow.com/a/4212908/2299554
|
||||
|
|
|
@ -20,8 +20,6 @@ use Appwrite\Database\Validator\Authorization;
|
|||
use Appwrite\Database\Exception\Duplicate;
|
||||
use Appwrite\Template\Template;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->post('/v1/teams')
|
||||
->desc('Create Team')
|
||||
->groups(['api', 'teams'])
|
||||
|
|
|
@ -21,8 +21,6 @@ use Appwrite\Database\Validator\UID;
|
|||
use DeviceDetector\DeviceDetector;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->post('/v1/users')
|
||||
->desc('Create User')
|
||||
->groups(['api', 'users'])
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
include_once __DIR__ . '/../shared/web.php';
|
||||
|
||||
global $utopia, $response, $request, $layout, $projectDB;
|
||||
|
||||
use Utopia\View;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
include_once __DIR__ . '/../shared/web.php';
|
||||
|
||||
global $utopia, $response, $request, $layout;
|
||||
|
||||
use Utopia\View;
|
||||
|
|
Loading…
Reference in a new issue