Move webhook to project notification type
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace Kanboard\ServiceProvider;
|
||||
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use League\HTMLToMarkdown\HtmlConverter;
|
||||
use Kanboard\Core\Plugin\Loader;
|
||||
use Kanboard\Core\Mail\Client as EmailClient;
|
||||
use Kanboard\Core\ObjectStorage\FileStorage;
|
||||
@@ -9,9 +12,7 @@ use Kanboard\Core\Paginator;
|
||||
use Kanboard\Core\OAuth2;
|
||||
use Kanboard\Core\Tool;
|
||||
use Kanboard\Model\UserNotificationType;
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use League\HTMLToMarkdown\HtmlConverter;
|
||||
use Kanboard\Model\ProjectNotificationType;
|
||||
|
||||
class ClassProvider implements ServiceProviderInterface
|
||||
{
|
||||
@@ -39,6 +40,7 @@ class ClassProvider implements ServiceProviderInterface
|
||||
'ProjectDailyStats',
|
||||
'ProjectIntegration',
|
||||
'ProjectPermission',
|
||||
'ProjectNotification',
|
||||
'Subtask',
|
||||
'SubtaskExport',
|
||||
'SubtaskTimeTracking',
|
||||
@@ -65,7 +67,6 @@ class ClassProvider implements ServiceProviderInterface
|
||||
'UserNotificationType',
|
||||
'UserNotificationFilter',
|
||||
'UserUnreadNotification',
|
||||
'Webhook',
|
||||
),
|
||||
'Formatter' => array(
|
||||
'TaskFilterGanttFormatter',
|
||||
@@ -135,6 +136,12 @@ class ClassProvider implements ServiceProviderInterface
|
||||
return $type;
|
||||
};
|
||||
|
||||
$container['projectNotificationType'] = function ($container) {
|
||||
$type = new ProjectNotificationType($container);
|
||||
$type->setType('webhook', t('Webhook'), '\Kanboard\Notification\Webhook', true);
|
||||
return $type;
|
||||
};
|
||||
|
||||
$container['pluginLoader'] = new Loader($container);
|
||||
|
||||
$container['cspRules'] = array('style-src' => "'self' 'unsafe-inline'", 'img-src' => '* data:');
|
||||
|
||||
Reference in New Issue
Block a user