mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 07:34:43 +00:00
Restore missing methods and fix silly bugs.
This commit is contained in:
@@ -546,13 +546,12 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
*/
|
||||
public function store(array $data): TransactionCurrency
|
||||
{
|
||||
throw new FireflyException(sprintf('Method "%s" needs a refactor.', __METHOD__));
|
||||
/** @var TransactionCurrencyFactory $factory */
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$result = $factory->create($data);
|
||||
|
||||
if (null === $result) {
|
||||
throw new FireflyException('400004: Could not store new currency.');
|
||||
if (true === $data['enabled']) {
|
||||
$this->user->currencies()->attach($result->id);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@@ -37,7 +37,6 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface CurrencyRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns the complete set of transactions but needs
|
||||
* no user object.
|
||||
|
Reference in New Issue
Block a user