mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Moved a method around.
This commit is contained in:
@@ -55,5 +55,19 @@ class AccountServiceProvider extends ServiceProvider
|
||||
return app('FireflyIII\Repositories\Account\AccountRepository', $arguments);
|
||||
}
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'FireflyIII\Repositories\Account\AccountTaskerInterface',
|
||||
function (Application $app, array $arguments) {
|
||||
if (!isset($arguments[0]) && $app->auth->check()) {
|
||||
return app('FireflyIII\Repositories\Account\AccountTasker', [auth()->user()]);
|
||||
}
|
||||
if (!isset($arguments[0]) && !$app->auth->check()) {
|
||||
throw new FireflyException('There is no user present.');
|
||||
}
|
||||
|
||||
return app('FireflyIII\Repositories\Account\AccountTasker', $arguments);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user