mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Allow budget store to have optional webhook using "fire_webhooks".
This commit is contained in:
@@ -44,6 +44,7 @@ use FireflyIII\Support\Facades\Steam;
|
||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupInterface;
|
||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||
use FireflyIII\Support\Singleton\PreferencesSingleton;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -724,6 +725,10 @@ class BudgetRepository implements BudgetRepositoryInterface, UserGroupInterface
|
||||
{
|
||||
$order = $this->getMaxOrder();
|
||||
|
||||
// this is a lame trick to communicate with the observer.
|
||||
$singleton = PreferencesSingleton::getInstance();
|
||||
$singleton->setPreference('fire_webhooks_budget_create', $data['fire_webhooks'] ?? true);
|
||||
|
||||
try {
|
||||
$newBudget = Budget::create(
|
||||
[
|
||||
|
Reference in New Issue
Block a user