1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Unified include calls

This commit is contained in:
Eldad Fux 2020-06-25 22:53:36 +03:00
parent e6c10a6201
commit ff6078fd7e
12 changed files with 6 additions and 23 deletions

View file

@ -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'];
}

View file

@ -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';

View file

@ -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',

View file

@ -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'])

View file

@ -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'])

View file

@ -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')

View file

@ -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

View file

@ -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'])

View file

@ -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'])

View file

@ -1,7 +1,5 @@
<?php
include_once __DIR__ . '/../shared/web.php';
global $utopia, $response, $request, $layout, $projectDB;
use Utopia\View;

View file

@ -1,7 +1,5 @@
<?php
include_once __DIR__ . '/../shared/web.php';
global $utopia, $response, $request, $layout;
use Utopia\View;

View file

@ -11,9 +11,9 @@
error_reporting(0);
ini_set('display_errors', 0);
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$path = (isset($_GET['q'])) ? explode('/', $_GET['q']) : [];