Add notification filters
This commit is contained in:
@@ -8,6 +8,10 @@ use Illuminate\Support\Arr;
|
||||
|
||||
class StoreProjectNotificationAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly NormalizeNotificationFilters $normalizeNotificationFilters,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param array{
|
||||
* channel: mixed,
|
||||
@@ -15,6 +19,7 @@ class StoreProjectNotificationAction
|
||||
* delivery_url: string,
|
||||
* enabled: bool,
|
||||
* event_type: mixed,
|
||||
* filters?: mixed,
|
||||
* message_template?: string|null,
|
||||
* name: string
|
||||
* } $validated
|
||||
@@ -27,6 +32,7 @@ class StoreProjectNotificationAction
|
||||
'delivery_url' => trim((string) Arr::get($validated, 'delivery_url')),
|
||||
'enabled' => (bool) Arr::get($validated, 'enabled'),
|
||||
'event_type' => Arr::get($validated, 'event_type'),
|
||||
'filters' => $this->normalizeNotificationFilters->handle(Arr::get($validated, 'filters')),
|
||||
'message_template' => $this->normalizeMessageTemplate(Arr::get($validated, 'message_template')),
|
||||
'name' => trim((string) Arr::get($validated, 'name')),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user