Moving events list to a config file
This commit is contained in:
parent
ee6b7afe5a
commit
dc1fd04e2d
|
@ -133,7 +133,11 @@ $utopia->get('/console/webhooks')
|
|||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../../views/console/webhooks/index.phtml');
|
||||
|
||||
|
||||
$page
|
||||
->setParam('events', Config::getParam('events', []))
|
||||
;
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Webhooks')
|
||||
->setParam('body', $page);
|
||||
|
|
|
@ -54,6 +54,7 @@ $response = new Response();
|
|||
/*
|
||||
* ENV vars
|
||||
*/
|
||||
Config::load('events', __DIR__.'/../app/config/events.php');
|
||||
Config::load('providers', __DIR__.'/../app/config/providers.php');
|
||||
Config::load('platforms', __DIR__.'/../app/config/platforms.php');
|
||||
Config::load('locales', __DIR__.'/../app/config/locales.php');
|
||||
|
|
|
@ -1,26 +1,6 @@
|
|||
<?php
|
||||
|
||||
$events = [
|
||||
'database.collections.create',
|
||||
'database.collections.update',
|
||||
'database.collections.delete',
|
||||
'database.documents.create',
|
||||
'database.documents.update',
|
||||
'database.documents.delete',
|
||||
'storage.files.create',
|
||||
'storage.files.update',
|
||||
'storage.files.delete',
|
||||
// 'auth.register',
|
||||
// 'auth.confirm',
|
||||
// 'auth.login',
|
||||
// 'auth.logout',
|
||||
'account.create',
|
||||
'account.update.email',
|
||||
'account.update.name',
|
||||
'account.update.password',
|
||||
'account.update.prefs',
|
||||
'account.delete',
|
||||
];
|
||||
$events = array_keys($this->getParam('events', []));
|
||||
|
||||
?>
|
||||
<div class="cover margin-bottom-large">
|
||||
|
|
Loading…
Reference in a new issue