Add option for webhooks.

This commit is contained in:
James Cole 2021-05-02 14:52:11 +02:00
parent e5736c822d
commit 2577e7301a
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 6 additions and 2 deletions

View File

@ -103,7 +103,9 @@ class StoreController extends Controller
throw new ValidationException($validator,0, $e);
}
app('preferences')->mark();
event(new StoredTransactionGroup($transactionGroup, $data['apply_rules'] ?? true));
$applyRules = $data['apply_rules'] ?? true;
$fireWebhooks = $data['fire_webhooks'] ?? true;
event(new StoredTransactionGroup($transactionGroup, $applyRules, $fireWebhooks));
$manager = $this->getManager();
/** @var User $admin */

View File

@ -80,7 +80,9 @@ class UpdateController extends Controller
$manager = $this->getManager();
app('preferences')->mark();
event(new UpdatedTransactionGroup($transactionGroup, $data['apply_rules'] ?? true));
$applyRules = $data['apply_rules'] ?? true;
$fireWebhooks = $data['fire_webhooks'] ?? true;
event(new UpdatedTransactionGroup($transactionGroup, $applyRules, $fireWebhooks));
/** @var User $admin */
$admin = auth()->user();