The webhook actions are optional

This commit is contained in:
Alex Tselegidis 2024-05-11 16:12:14 +02:00
parent c9bb9e85de
commit 0706d3fdab

View file

@ -72,7 +72,7 @@ class Webhooks_model extends EA_Model
*/
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));
}
}