1
0
Fork 0
mirror of synced 2024-05-19 04:02:34 +12:00
appwrite/app/controllers/web/console.php

516 lines
16 KiB
PHP
Raw Normal View History

2019-05-09 18:54:39 +12:00
<?php
use Appwrite\Extend\Exception;
2022-05-27 01:23:49 +12:00
use Appwrite\Utopia\Response;
2021-12-14 22:11:34 +13:00
use Appwrite\Utopia\View;
2020-06-29 05:31:21 +12:00
use Utopia\App;
2020-03-29 01:42:16 +13:00
use Utopia\Config\Config;
2020-02-23 21:58:30 +13:00
use Utopia\Domains\Domain;
2021-08-08 00:45:44 +12:00
use Utopia\Database\Validator\UID;
2021-01-22 21:28:33 +13:00
use Utopia\Storage\Storage;
2019-05-09 18:54:39 +12:00
2022-05-27 01:23:49 +12:00
App::init(function (View $layout) {
2020-06-30 09:43:34 +12:00
2019-05-09 18:54:39 +12:00
$layout
->setParam('description', 'Appwrite Console allows you to easily manage, monitor, and control your entire backend API and tools.')
2019-05-09 18:54:39 +12:00
->setParam('analytics', 'UA-26264668-5')
;
2020-06-30 09:43:34 +12:00
}, ['layout'], 'console');
2022-05-27 01:23:49 +12:00
App::shutdown(function (Response $response, View $layout) {
2019-05-09 18:54:39 +12:00
2022-05-24 02:54:50 +12:00
$header = new View(__DIR__ . '/../../views/console/comps/header.phtml');
$footer = new View(__DIR__ . '/../../views/console/comps/footer.phtml');
2019-05-09 18:54:39 +12:00
2019-08-24 19:30:12 +12:00
$footer
2020-06-29 08:45:36 +12:00
->setParam('home', App::getEnv('_APP_HOME', ''))
2020-06-30 23:09:28 +12:00
->setParam('version', App::getEnv('_APP_VERSION', 'UNKNOWN'))
2019-08-24 19:30:12 +12:00
;
2019-05-09 18:54:39 +12:00
$layout
->setParam('header', [$header])
->setParam('footer', [$footer])
;
2020-07-09 21:11:10 +12:00
$response->html($layout->render());
2020-06-30 09:43:34 +12:00
}, ['response', 'layout'], 'console');
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/error/:code')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'home')
->param('code', null, new \Utopia\Validator\Numeric(), 'Valid status code number', false)
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (int $code, View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/error.phtml');
2019-05-09 18:54:39 +12:00
$page
->setParam('code', $code)
;
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Error')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/index.phtml');
2019-05-09 18:54:39 +12:00
2019-08-24 19:30:12 +12:00
$page
2020-06-29 08:45:36 +12:00
->setParam('home', App::getEnv('_APP_HOME', ''))
2019-08-24 19:30:12 +12:00
;
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Console')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/account')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/account/index.phtml');
2019-05-09 18:54:39 +12:00
2022-05-24 02:54:50 +12:00
$cc = new View(__DIR__ . '/../../views/console/forms/credit-card.phtml');
2019-05-09 18:54:39 +12:00
$page
->setParam('cc', $cc)
;
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', 'Account - ' . APP_NAME)
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/notifications')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/v1/console/notifications/index.phtml');
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Notifications')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/home')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/home/index.phtml');
2021-01-13 19:25:43 +13:00
$page
2022-05-24 02:54:50 +12:00
->setParam('usageStatsEnabled', App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled');
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Console')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/settings')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2020-06-29 08:45:36 +12:00
$target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', ''));
2020-02-23 21:58:30 +13:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/settings/index.phtml');
2019-05-09 18:54:39 +12:00
2022-05-24 04:42:27 +12:00
$page->setParam('services', array_filter(Config::getParam('services'), fn($element) => $element['optional']))
2020-02-25 01:55:42 +13:00
->setParam('customDomainsEnabled', ($target->isKnown() && !$target->isTest()))
->setParam('customDomainsTarget', $target->get())
2021-02-23 04:50:14 +13:00
->setParam('smtpEnabled', (!empty(App::getEnv('_APP_SMTP_HOST'))))
2020-02-23 21:58:30 +13:00
;
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Settings')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2022-05-06 20:49:37 +12:00
App::get('/console/webhooks')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-08-05 16:47:52 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/webhooks/index.phtml');
2019-08-05 16:47:52 +12:00
2022-04-28 23:40:59 +12:00
$page->setParam('events', Config::getParam('events', []));
2022-04-19 04:21:45 +12:00
2019-08-05 16:47:52 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Webhooks')
2019-08-05 16:47:52 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-08-05 16:47:52 +12:00
2022-05-06 20:49:37 +12:00
App::get('/console/webhooks/webhook')
2022-05-04 23:29:50 +12:00
->groups(['web', 'console'])
->label('permission', 'public')
->label('scope', 'console')
2022-05-06 20:49:37 +12:00
->param('id', '', new UID(), 'Webhook unique ID.')
2022-05-04 23:29:50 +12:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (string $id, View $layout) {
2022-05-04 23:29:50 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/webhooks/webhook.phtml');
2022-05-04 23:29:50 +12:00
2022-05-06 20:49:37 +12:00
$page
->setParam('events', Config::getParam('events', []))
->setParam('new', false)
;
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Webhooks')
2022-05-06 20:49:37 +12:00
->setParam('body', $page);
});
App::get('/console/webhooks/webhook/new')
->groups(['web', 'console'])
->label('permission', 'public')
->label('scope', 'console')
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2022-05-06 20:49:37 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/webhooks/webhook.phtml');
2022-05-06 20:49:37 +12:00
$page
->setParam('events', Config::getParam('events', []))
->setParam('new', true)
;
2022-05-04 23:29:50 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Webhooks')
2022-05-04 23:29:50 +12:00
->setParam('body', $page);
});
2020-06-29 05:31:21 +12:00
App::get('/console/keys')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-08-05 16:47:52 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2021-01-01 19:42:50 +13:00
$scopes = array_keys(Config::getParam('scopes'));
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/keys/index.phtml');
2019-08-05 16:47:52 +12:00
2019-12-16 18:11:41 +13:00
$page->setParam('scopes', $scopes);
2019-08-05 16:47:52 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - API Keys')
2019-08-05 16:47:52 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-08-05 16:47:52 +12:00
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
App::get('/console/databases')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
$page = new View(__DIR__ . '/../../views/console/databases/index.phtml');
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Database')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
App::get('/console/databases/database')
->groups(['web', 'console'])
->label('permission', 'public')
->label('scope', 'console')
->param('id', '', new UID(), 'Database unique ID.')
->inject('response')
->inject('layout')
->action(function (string $id, Response $response, View $layout) {
$logs = new View(__DIR__ . '/../../views/console/comps/logs.phtml');
$logs
->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0))
->setParam('method', 'database.listLogs')
->setParam('params', [
'database-id' => '{{router.params.id}}',
])
;
$page = new View(__DIR__ . '/../../views/console/databases/database.phtml');
$page->setParam('logs', $logs);
$layout
->setParam('title', APP_NAME . ' - Database')
->setParam('body', $page)
;
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Expires', 0)
->addHeader('Pragma', 'no-cache')
;
});
App::get('/console/databases/collection')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-08-07 01:57:12 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-09-11 02:40:14 +12:00
->param('id', '', new UID(), 'Collection unique ID.')
2020-12-27 05:59:59 +13:00
->inject('response')
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (string $id, Response $response, View $layout) {
2020-05-03 07:57:52 +12:00
2022-05-24 02:54:50 +12:00
$logs = new View(__DIR__ . '/../../views/console/comps/logs.phtml');
2021-08-16 09:09:40 +12:00
$logs
->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0))
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->setParam('method', 'databases.listCollectionLogs')
->setParam('params', [
'collection-id' => '{{router.params.id}}',
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'database-id' => '{{router.params.databaseId}}'
])
2021-08-16 09:09:40 +12:00
;
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
$page = new View(__DIR__ . '/../../views/console/databases/collection.phtml');
2022-05-24 02:54:50 +12:00
2021-08-14 22:13:24 +12:00
$page->setParam('logs', $logs);
2022-05-24 02:54:50 +12:00
2019-08-07 01:57:12 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Database Collection')
->setParam('body', $page)
;
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Expires', 0)
->addHeader('Pragma', 'no-cache')
;
2020-12-27 05:59:59 +13:00
});
2020-03-17 07:41:56 +13:00
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
App::get('/console/databases/document')
->groups(['web', 'console'])
->label('permission', 'public')
->label('scope', 'console')
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->param('databaseId', '', new UID(), 'Database unique ID.')
->param('collection', '', new UID(), 'Collection unique ID.')
->inject('layout')
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->action(function (string $databaseId, string $collection, View $layout) {
2022-05-24 02:54:50 +12:00
$logs = new View(__DIR__ . '/../../views/console/comps/logs.phtml');
$logs
->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0))
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->setParam('method', 'databases.listDocumentLogs')
->setParam('params', [
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
'database-id' => '{{router.params.databaseId}}',
'collection-id' => '{{router.params.collection}}',
'document-id' => '{{router.params.id}}',
])
;
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
$page = new View(__DIR__ . '/../../views/console/databases/document.phtml');
$page
->setParam('new', false)
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->setParam('database', $databaseId)
->setParam('collection', $collection)
->setParam('logs', $logs)
;
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Database Document')
->setParam('body', $page);
});
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
App::get('/console/databases/document/new')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2020-03-17 07:41:56 +13:00
->label('permission', 'public')
->label('scope', 'console')
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->param('databaseId', '', new UID(), 'Database unique ID.')
2020-09-11 02:40:14 +12:00
->param('collection', '', new UID(), 'Collection unique ID.')
2020-12-27 05:59:59 +13:00
->inject('layout')
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->action(function (string $databaseId, string $collection, View $layout) {
2020-04-23 15:25:00 +12:00
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
$page = new View(__DIR__ . '/../../views/console/databases/document.phtml');
2020-03-17 07:41:56 +13:00
2020-04-21 06:47:26 +12:00
$page
->setParam('new', true)
Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
2022-06-22 22:51:49 +12:00
->setParam('database', $databaseId)
2020-04-21 06:47:26 +12:00
->setParam('collection', $collection)
->setParam('logs', new View())
2020-04-21 06:47:26 +12:00
;
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Database Document')
2020-04-21 06:47:26 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2020-04-21 06:47:26 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/storage')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2022-05-24 02:54:50 +12:00
2022-05-31 23:35:59 +12:00
$page = new View(__DIR__ . '/../../views/console/storage/index.phtml');
2019-10-13 10:53:03 +13:00
$page
2020-06-29 08:45:36 +12:00
->setParam('home', App::getEnv('_APP_HOME', 0))
->setParam('fileLimit', App::getEnv('_APP_STORAGE_LIMIT', 0))
->setParam('fileLimitHuman', Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0)))
2019-10-13 10:53:03 +13:00
;
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Storage')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2021-11-08 21:26:06 +13:00
App::get('/console/storage/bucket')
->groups(['web', 'console'])
->label('permission', 'public')
->label('scope', 'console')
->param('id', '', new UID(), 'Bucket unique ID.')
->inject('response')
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (string $id, Response $response, View $layout) {
2021-11-08 21:26:06 +13:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/storage/bucket.phtml');
2021-11-08 21:26:06 +13:00
$page
->setParam('home', App::getEnv('_APP_HOME', 0))
->setParam('fileLimit', App::getEnv('_APP_STORAGE_LIMIT', 0))
->setParam('fileLimitHuman', Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0)))
;
2022-05-24 02:54:50 +12:00
2021-11-08 21:26:06 +13:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Storage Buckets')
2021-11-08 21:26:06 +13:00
->setParam('body', $page)
;
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Expires', 0)
->addHeader('Pragma', 'no-cache')
;
});
2020-06-29 05:31:21 +12:00
App::get('/console/users')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/users/index.phtml');
2019-05-09 18:54:39 +12:00
2021-03-01 00:41:18 +13:00
$page
->setParam('auth', Config::getParam('auth'))
->setParam('providers', Config::getParam('providers'))
->setParam('smtpEnabled', (!empty(App::getEnv('_APP_SMTP_HOST'))))
2021-03-01 00:41:18 +13:00
;
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Users')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2019-05-09 18:54:39 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/users/user')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2019-05-09 18:54:39 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/users/user.phtml');
2019-05-09 18:54:39 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - User')
2020-06-07 16:18:02 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2020-06-07 16:18:02 +12:00
2020-06-29 05:31:21 +12:00
App::get('/console/users/teams/team')
2020-06-26 06:32:12 +12:00
->groups(['web', 'console'])
2020-06-07 16:18:02 +12:00
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2020-06-30 09:43:34 +12:00
2022-05-24 02:54:50 +12:00
$page = new View(__DIR__ . '/../../views/console/users/team.phtml');
2020-06-07 16:18:02 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Team')
2019-05-09 18:54:39 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
App::get('/console/functions')
2020-07-13 09:18:52 +12:00
->groups(['web', 'console'])
2020-05-05 01:34:31 +12:00
->desc('Platform console project functions')
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2022-05-31 23:35:59 +12:00
$page = new View(__DIR__ . '/../../views/console/functions/index.phtml');
2020-05-05 01:34:31 +12:00
2020-07-15 04:13:18 +12:00
$page
2021-04-21 23:02:54 +12:00
->setParam('runtimes', Config::getParam('runtimes'))
2020-07-15 04:13:18 +12:00
;
2020-05-05 01:34:31 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Functions')
2020-05-11 16:39:00 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2020-05-11 16:39:00 +12:00
App::get('/console/functions/function')
2020-07-13 09:18:52 +12:00
->groups(['web', 'console'])
2020-05-11 16:39:00 +12:00
->desc('Platform console project function')
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('layout')
2022-05-27 01:23:49 +12:00
->action(function (View $layout) {
2022-05-31 23:35:59 +12:00
$page = new View(__DIR__ . '/../../views/console/functions/function.phtml');
2020-05-11 16:39:00 +12:00
2020-05-11 18:48:26 +12:00
$page
->setParam('events', Config::getParam('events', []))
2020-07-15 15:38:57 +12:00
->setParam('fileLimit', App::getEnv('_APP_STORAGE_LIMIT', 0))
->setParam('fileLimitHuman', Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0)))
2020-07-20 02:42:46 +12:00
->setParam('timeout', (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900))
2022-05-24 02:54:50 +12:00
->setParam('usageStatsEnabled', App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled');
2020-05-11 18:48:26 +12:00
;
2020-05-11 16:39:00 +12:00
$layout
2022-05-24 02:54:50 +12:00
->setParam('title', APP_NAME . ' - Function')
2020-05-05 01:34:31 +12:00
->setParam('body', $page);
2020-12-27 05:59:59 +13:00
});
2020-07-25 18:26:25 +12:00
App::get('/console/version')
->groups(['web', 'console'])
->desc('Check for new version')
->label('permission', 'public')
->label('scope', 'console')
2020-12-27 05:59:59 +13:00
->inject('response')
2020-07-25 18:26:25 +12:00
->action(function ($response) {
try {
2022-05-24 02:54:50 +12:00
$version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost') . '/v1/health/version'), true);
2020-10-28 08:46:15 +13:00
if ($version && isset($version['version'])) {
2020-07-25 18:26:25 +12:00
return $response->json(['version' => $version['version']]);
2020-10-28 08:46:15 +13:00
} else {
throw new Exception('Failed to check for a newer version', 500, Exception::GENERAL_SERVER_ERROR);
2020-07-25 18:26:25 +12:00
}
} catch (\Throwable $th) {
throw new Exception('Failed to check for a newer version', 500, Exception::GENERAL_SERVER_ERROR);
2020-07-25 18:26:25 +12:00
}
2022-05-24 02:54:50 +12:00
});