The webhook actions are optional

This commit is contained in:
Alex Tselegidis 2024-05-11 16:12:14 +02:00
parent c33ebeded2
commit 9007e977fa

View file

@ -72,7 +72,7 @@ class Webhooks_model extends EA_Model
*/ */
public function validate(array $webhook): void public function validate(array $webhook): void
{ {
if (empty($webhook['name']) || empty($webhook['url']) || empty($webhook['actions'])) { if (empty($webhook['name']) || empty($webhook['url'])) {
throw new InvalidArgumentException('Not all required fields are provided: ' . print_r($webhook, true)); throw new InvalidArgumentException('Not all required fields are provided: ' . print_r($webhook, true));
} }
} }