mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add webhook code and rebuild.
This commit is contained in:
@@ -143,6 +143,49 @@ class Webhook extends Model
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getTriggersForValidation(): array
|
||||
{
|
||||
$array = [];
|
||||
$set = WebhookTrigger::cases();
|
||||
foreach ($set as $item) {
|
||||
$array[$item->name] = $item->value;
|
||||
$array[$item->value] = $item->value;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getResponsesForValidation(): array
|
||||
{
|
||||
$array = [];
|
||||
$set = WebhookResponse::cases();
|
||||
foreach ($set as $item) {
|
||||
$array[$item->name] = $item->value;
|
||||
$array[$item->value] = $item->value;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getDeliveriesForValidation(): array
|
||||
{
|
||||
$array = [];
|
||||
$set = WebhookDelivery::cases();
|
||||
foreach ($set as $item) {
|
||||
$array[$item->name] = $item->value;
|
||||
$array[$item->value] = $item->value;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user