mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 04:21:20 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -39,11 +39,11 @@ class UpdateRequest extends FormRequest
|
||||
|
||||
public function getData(): array
|
||||
{
|
||||
$triggers = Webhook::getTriggersForValidation();
|
||||
$responses = Webhook::getResponsesForValidation();
|
||||
$deliveries = Webhook::getDeliveriesForValidation();
|
||||
$triggers = Webhook::getTriggersForValidation();
|
||||
$responses = Webhook::getResponsesForValidation();
|
||||
$deliveries = Webhook::getDeliveriesForValidation();
|
||||
|
||||
$fields = [
|
||||
$fields = [
|
||||
'title' => ['title', 'convertString'],
|
||||
'active' => ['active', 'boolean'],
|
||||
'trigger' => ['trigger', 'convertString'],
|
||||
@@ -53,7 +53,7 @@ class UpdateRequest extends FormRequest
|
||||
];
|
||||
|
||||
// this is the way.
|
||||
$return = $this->getAllData($fields);
|
||||
$return = $this->getAllData($fields);
|
||||
if (array_key_exists('trigger', $return)) {
|
||||
$return['trigger'] = $triggers[$return['trigger']] ?? 0;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ class UpdateRequest extends FormRequest
|
||||
$validProtocols = config('firefly.valid_url_protocols');
|
||||
|
||||
/** @var Webhook $webhook */
|
||||
$webhook = $this->route()->parameter('webhook');
|
||||
$webhook = $this->route()->parameter('webhook');
|
||||
|
||||
return [
|
||||
'title' => sprintf('between:1,512|uniqueObjectForUser:webhooks,title,%d', $webhook->id),
|
||||
|
||||
Reference in New Issue
Block a user