Fixed paths
This commit is contained in:
parent
ef3545cb75
commit
6ab90cd01e
|
@ -436,7 +436,7 @@ $utopia->get('/v1/open-api-2.json')
|
|||
if (!$tests && !$service['sdk']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
include_once $service['controller'];
|
||||
}
|
||||
|
@ -722,7 +722,8 @@ $utopia->get('/v1/open-api-2.json')
|
|||
|
||||
ksort($output['paths']);
|
||||
|
||||
$response->json($output);
|
||||
$response
|
||||
->json($output);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use Database\Validator\Authorization;
|
|||
use DeviceDetector\DeviceDetector;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/account')
|
||||
->desc('Get Account')
|
||||
|
|
|
@ -18,7 +18,7 @@ use Database\Validator\UID;
|
|||
use Template\Template;
|
||||
use OpenSSL\OpenSSL;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->post('/v1/auth/register')
|
||||
->desc('Register')
|
||||
|
@ -137,7 +137,7 @@ $utopia->post('/v1/auth/register')
|
|||
$confirm['query'] = Template::mergeQuery(((isset($confirm['query'])) ? $confirm['query'] : ''), ['userId' => $user->getUid(), 'token' => $confirmSecret]);
|
||||
$confirm = Template::unParseURL($confirm);
|
||||
|
||||
$body = new Template(__DIR__.'/../config/locales/templates/'.Locale::getText('auth.emails.confirm.body'));
|
||||
$body = new Template(__DIR__.'/../../config/locales/templates/'.Locale::getText('auth.emails.confirm.body'));
|
||||
$body
|
||||
->setParam('{{direction}}', Locale::getText('settings.direction'))
|
||||
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
|
||||
|
@ -275,7 +275,7 @@ $utopia->post('/v1/auth/register/confirm/resend')
|
|||
$confirm['query'] = Template::mergeQuery(((isset($confirm['query'])) ? $confirm['query'] : ''), ['userId' => $user->getUid(), 'token' => $secret]);
|
||||
$confirm = Template::unParseURL($confirm);
|
||||
|
||||
$body = new Template(__DIR__.'/../config/locales/templates/'.Locale::getText('auth.emails.confirm.body'));
|
||||
$body = new Template(__DIR__.'/../../config/locales/templates/'.Locale::getText('auth.emails.confirm.body'));
|
||||
$body
|
||||
->setParam('{{direction}}', Locale::getText('settings.direction'))
|
||||
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
|
||||
|
@ -731,7 +731,7 @@ $utopia->post('/v1/auth/recovery')
|
|||
$reset['query'] = Template::mergeQuery(((isset($reset['query'])) ? $reset['query'] : ''), ['userId' => $profile->getUid(), 'token' => $secret]);
|
||||
$reset = Template::unParseURL($reset);
|
||||
|
||||
$body = new Template(__DIR__.'/../config/locales/templates/'.Locale::getText('auth.emails.recovery.body'));
|
||||
$body = new Template(__DIR__.'/../../config/locales/templates/'.Locale::getText('auth.emails.recovery.body'));
|
||||
$body
|
||||
->setParam('{{direction}}', Locale::getText('settings.direction'))
|
||||
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
|
||||
|
|
|
@ -15,12 +15,12 @@ use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
|
|||
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
|
||||
use BaconQrCode\Writer;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$types = [
|
||||
'browsers' => include __DIR__.'/../config/avatars/browsers.php',
|
||||
'credit-cards' => include __DIR__.'/../config/avatars/credit-cards.php',
|
||||
'flags' => include __DIR__.'/../config/avatars/flags.php',
|
||||
'browsers' => include __DIR__.'/../../config/avatars/browsers.php',
|
||||
'credit-cards' => include __DIR__.'/../../config/avatars/credit-cards.php',
|
||||
'flags' => include __DIR__.'/../../config/avatars/flags.php',
|
||||
];
|
||||
|
||||
$avatarCallback = function ($type, $code, $width, $height, $quality) use ($types, $response, $request) {
|
||||
|
|
|
@ -19,7 +19,7 @@ use Database\Validator\Authorization;
|
|||
use Database\Exception\Authorization as AuthorizationException;
|
||||
use Database\Exception\Structure as StructureException;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$isDev = (App::ENV_TYPE_PRODUCTION !== $utopia->getEnv());
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Database\Database;
|
|||
use Database\Document;
|
||||
use Database\Validator\UID;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$scopes = include __DIR__.'/../../../app/config/scopes.php';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use Utopia\App;
|
|||
use Utopia\Locale\Locale;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/locale')
|
||||
->desc('Get User Locale')
|
||||
|
@ -16,9 +16,9 @@ $utopia->get('/v1/locale')
|
|||
->label('sdk.description', '/docs/references/locale/get-locale.md')
|
||||
->action(
|
||||
function () use ($response, $request, $utopia) {
|
||||
$eu = include __DIR__.'/../config/eu.php';
|
||||
$currencies = include __DIR__.'/../config/currencies.php';
|
||||
$reader = new Reader(__DIR__.'/../db/GeoLite2/GeoLite2-Country.mmdb');
|
||||
$eu = include __DIR__.'/../../config/eu.php';
|
||||
$currencies = include __DIR__.'/../../config/currencies.php';
|
||||
$reader = new Reader(__DIR__.'/../../db/GeoLite2/GeoLite2-Country.mmdb');
|
||||
$output = [];
|
||||
$ip = $request->getIP();
|
||||
$time = (60 * 60 * 24 * 45); // 45 days cache
|
||||
|
@ -90,7 +90,7 @@ $utopia->get('/v1/locale/countries/eu')
|
|||
->action(
|
||||
function () use ($response) {
|
||||
$countries = Locale::getText('countries'); /* @var $countries array */
|
||||
$eu = include __DIR__.'/../config/eu.php';
|
||||
$eu = include __DIR__.'/../../config/eu.php';
|
||||
$list = [];
|
||||
|
||||
foreach ($eu as $code) {
|
||||
|
@ -113,7 +113,7 @@ $utopia->get('/v1/locale/countries/phones')
|
|||
->label('sdk.description', '/docs/references/locale/get-countries-phones.md')
|
||||
->action(
|
||||
function () use ($response) {
|
||||
$list = include __DIR__.'/../config/phones.php'; /* @var $list array */
|
||||
$list = include __DIR__.'/../../config/phones.php'; /* @var $list array */
|
||||
|
||||
$countries = Locale::getText('countries'); /* @var $countries array */
|
||||
|
||||
|
@ -154,7 +154,7 @@ $utopia->get('/v1/locale/currencies')
|
|||
->label('sdk.description', '/docs/references/locale/get-currencies.md')
|
||||
->action(
|
||||
function () use ($response) {
|
||||
$currencies = include __DIR__.'/../config/currencies.php';
|
||||
$currencies = include __DIR__.'/../../config/currencies.php';
|
||||
|
||||
$response->json($currencies);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ use Database\Database;
|
|||
use Database\Document;
|
||||
use Database\Validator\UID;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/platforms')
|
||||
->desc('List Platforms')
|
||||
|
|
|
@ -13,7 +13,7 @@ use Database\Document;
|
|||
use Database\Validator\UID;
|
||||
use OpenSSL\OpenSSL;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/projects')
|
||||
->desc('List Projects')
|
||||
|
|
|
@ -22,7 +22,7 @@ use Storage\Compression\Algorithms\GZIP;
|
|||
use Resize\Resize;
|
||||
use OpenSSL\OpenSSL;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
Storage::addDevice('local', new Local('app-'.$project->getUid()));
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ use Database\Validator\UID;
|
|||
use OpenSSL\OpenSSL;
|
||||
use Cron\CronExpression;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/tasks')
|
||||
->desc('List Tasks')
|
||||
|
|
|
@ -18,7 +18,7 @@ use Database\Validator\Authorization;
|
|||
use Template\Template;
|
||||
use Auth\Auth;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/teams')
|
||||
->desc('List Teams')
|
||||
|
@ -358,7 +358,7 @@ $utopia->post('/v1/teams/:teamId/memberships')
|
|||
$redirect['query'] = Template::mergeQuery(((isset($redirect['query'])) ? $redirect['query'] : ''), ['inviteId' => $membership->getUid(), 'teamId' => $team->getUid(), 'userId' => $invitee->getUid(), 'secret' => $secret]);
|
||||
$redirect = Template::unParseURL($redirect);
|
||||
|
||||
$body = new Template(__DIR__.'/../config/locales/templates/'.Locale::getText('auth.emails.invitation.body'));
|
||||
$body = new Template(__DIR__.'/../../config/locales/templates/'.Locale::getText('auth.emails.invitation.body'));
|
||||
$body
|
||||
->setParam('{{direction}}', Locale::getText('settings.direction'))
|
||||
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
|
||||
|
@ -437,7 +437,7 @@ $utopia->post('/v1/teams/:teamId/memberships/:inviteId/resend')
|
|||
$redirect['query'] = Template::mergeQuery(((isset($redirect['query'])) ? $redirect['query'] : ''), ['inviteId' => $membership->getUid(), 'userId' => $membership->getAttribute('userId'), 'secret' => $secret]);
|
||||
$redirect = Template::unParseURL($redirect);
|
||||
|
||||
$body = new Template(__DIR__.'/../config/locales/templates/'.Locale::getText('auth.emails.invitation.body'));
|
||||
$body = new Template(__DIR__.'/../../config/locales/templates/'.Locale::getText('auth.emails.invitation.body'));
|
||||
$body
|
||||
->setParam('{{direction}}', Locale::getText('settings.direction'))
|
||||
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
|
||||
|
|
|
@ -16,7 +16,7 @@ use Database\Validator\UID;
|
|||
use DeviceDetector\DeviceDetector;
|
||||
use GeoIp2\Database\Reader;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/users')
|
||||
->desc('List Users')
|
||||
|
|
|
@ -13,7 +13,7 @@ use Database\Document;
|
|||
use Database\Validator\UID;
|
||||
use OpenSSL\OpenSSL;
|
||||
|
||||
include_once '../shared/api.php';
|
||||
include_once __DIR__ . '/../shared/api.php';
|
||||
|
||||
$utopia->get('/v1/webhooks')
|
||||
->desc('List Webhooks')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
include_once '../shared/web.php';
|
||||
include_once __DIR__ . '/../shared/web.php';
|
||||
|
||||
global $utopia, $response, $request, $layout, $version, $providers;
|
||||
|
||||
|
@ -15,8 +15,8 @@ $utopia->init(function () use ($layout, $utopia) {
|
|||
});
|
||||
|
||||
$utopia->shutdown(function () use ($utopia, $response, $request, $layout, $version) {
|
||||
$header = new View(__DIR__.'/../views/console/comps/header.phtml');
|
||||
$footer = new View(__DIR__.'/../views/console/comps/footer.phtml');
|
||||
$header = new View(__DIR__.'/../../views/console/comps/header.phtml');
|
||||
$footer = new View(__DIR__.'/../../views/console/comps/footer.phtml');
|
||||
|
||||
$footer
|
||||
->setParam('home', $request->getServer('_APP_HOME', ''))
|
||||
|
@ -44,7 +44,7 @@ $utopia->get('/error/:code')
|
|||
->label('scope', 'home')
|
||||
->param('code', null, new \Utopia\Validator\Numeric(), 'Valid status code number', false)
|
||||
->action(function ($code) use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/error.phtml');
|
||||
$page = new View(__DIR__.'/../../views/error.phtml');
|
||||
|
||||
$page
|
||||
->setParam('code', $code)
|
||||
|
@ -59,7 +59,7 @@ $utopia->get('/console')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout, $request) {
|
||||
$page = new View(__DIR__.'/../views/console/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/index.phtml');
|
||||
|
||||
$page
|
||||
->setParam('home', $request->getServer('_APP_HOME', ''))
|
||||
|
@ -74,9 +74,9 @@ $utopia->get('/console/account')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/account/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/account/index.phtml');
|
||||
|
||||
$cc = new View(__DIR__.'/../views/console/forms/credit-card.phtml');
|
||||
$cc = new View(__DIR__.'/../../views/console/forms/credit-card.phtml');
|
||||
|
||||
$page
|
||||
->setParam('cc', $cc)
|
||||
|
@ -92,7 +92,7 @@ $utopia->get('/console/notifications')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/v1/console/notifications/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/v1/console/notifications/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Notifications')
|
||||
|
@ -104,7 +104,7 @@ $utopia->get('/console/home')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/home/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/home/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Console')
|
||||
|
@ -116,7 +116,7 @@ $utopia->get('/console/settings')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/settings/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/settings/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Settings')
|
||||
|
@ -128,7 +128,7 @@ $utopia->get('/console/webhooks')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/webhooks/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/webhooks/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Webhooks')
|
||||
|
@ -141,7 +141,7 @@ $utopia->get('/console/keys')
|
|||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$scopes = include __DIR__.'/../../../app/config/scopes.php';
|
||||
$page = new View(__DIR__.'/../views/console/keys/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/keys/index.phtml');
|
||||
|
||||
$page->setParam('scopes', $scopes);
|
||||
|
||||
|
@ -155,7 +155,7 @@ $utopia->get('/console/tasks')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/tasks/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/tasks/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Tasks')
|
||||
|
@ -167,7 +167,7 @@ $utopia->get('/console/database')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/console/database/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/database/index.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Database')
|
||||
|
@ -186,7 +186,7 @@ $utopia->get('/console/database/collection')
|
|||
throw new Exception('Collection not found', 404);
|
||||
}
|
||||
|
||||
$page = new View(__DIR__.'/../views/console/database/collection.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/database/collection.phtml');
|
||||
|
||||
$page
|
||||
->setParam('collection', $collection->getArrayCopy())
|
||||
|
@ -202,7 +202,7 @@ $utopia->get('/console/storage')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($request, $layout) {
|
||||
$page = new View(__DIR__.'/../views/console/storage/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/storage/index.phtml');
|
||||
|
||||
$page
|
||||
->setParam('home', $request->getServer('_APP_HOME', ''))
|
||||
|
@ -218,7 +218,7 @@ $utopia->get('/console/users')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout, $providers) {
|
||||
$page = new View(__DIR__.'/../views/console/users/index.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/users/index.phtml');
|
||||
|
||||
$page->setParam('providers', $providers);
|
||||
|
||||
|
@ -232,7 +232,7 @@ $utopia->get('/console/users/view')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout, $providers) {
|
||||
$page = new View(__DIR__.'/../views/console/users/view.phtml');
|
||||
$page = new View(__DIR__.'/../../views/console/users/view.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - View User')
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
include_once '../shared/web.php';
|
||||
include_once __DIR__ . '/../shared/web.php';
|
||||
|
||||
global $utopia, $response, $request, $layout, $version, $providers, $sdks;
|
||||
|
||||
use Utopia\View;
|
||||
|
||||
$header = new View(__DIR__.'/../views/home/comps/header.phtml');
|
||||
$footer = new View(__DIR__.'/../views/home/comps/footer.phtml');
|
||||
$header = new View(__DIR__.'/../../views/home/comps/header.phtml');
|
||||
$footer = new View(__DIR__.'/../../views/home/comps/footer.phtml');
|
||||
|
||||
$footer
|
||||
->setParam('version', $version)
|
||||
|
@ -39,7 +39,7 @@ $utopia->get('/auth/signin')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/signin.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/signin.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Sign In - '.APP_NAME)
|
||||
|
@ -51,7 +51,7 @@ $utopia->get('/auth/signup')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/signup.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/signup.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Sign Up - '.APP_NAME)
|
||||
|
@ -63,7 +63,7 @@ $utopia->get('/auth/recovery')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($request, $layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/recovery.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/recovery.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Password Recovery - '.APP_NAME)
|
||||
|
@ -75,7 +75,7 @@ $utopia->get('/auth/confirm')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/confirm.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/confirm.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Account Confirmation - '.APP_NAME)
|
||||
|
@ -87,7 +87,7 @@ $utopia->get('/auth/join')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/join.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/join.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Invitation - '.APP_NAME)
|
||||
|
@ -99,7 +99,7 @@ $utopia->get('/auth/recovery/reset')
|
|||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/home/auth/recovery/reset.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/recovery/reset.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', 'Password Reset - '.APP_NAME)
|
||||
|
@ -112,7 +112,7 @@ $utopia->get('/error/:code')
|
|||
->label('scope', 'home')
|
||||
->param('code', null, new \Utopia\Validator\Numeric(), 'Valid status code number', false)
|
||||
->action(function ($code) use ($layout) {
|
||||
$page = new View(__DIR__.'/../views/error.phtml');
|
||||
$page = new View(__DIR__.'/../../views/error.phtml');
|
||||
|
||||
$page
|
||||
->setParam('code', $code)
|
||||
|
|
|
@ -25,9 +25,9 @@ switch ($version) { // Switch between API version
|
|||
case 'v1':
|
||||
$service = $version . '/' . array_shift($path);
|
||||
include __DIR__ . '/../app/app.php';
|
||||
break;
|
||||
break;
|
||||
case 'console':
|
||||
default:
|
||||
default:
|
||||
$service = $version . '/';
|
||||
include __DIR__ . '/../app/app.php';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue