mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand API options for available budgets and journal links
This commit is contained in:
@@ -153,6 +153,9 @@ class AvailableBudgetController extends Controller
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$currency = $this->currencyRepository->findNull($data['transaction_currency_id']);
|
||||
if (null === $currency) {
|
||||
$this->currencyRepository->findByCodeNull($data['transaction_currency_code']);
|
||||
}
|
||||
if (null === $currency) {
|
||||
throw new FireflyException('Could not find the indicated currency.');
|
||||
}
|
||||
|
@@ -175,8 +175,7 @@ class JournalLinkController extends Controller
|
||||
$data['direction'] = 'inward';
|
||||
|
||||
$journalLink = $this->repository->storeLink($data, $inward, $outward);
|
||||
|
||||
$resource = new Item($journalLink, new JournalLinkTransformer($this->parameters), 'journal_links');
|
||||
$resource = new Item($journalLink, new JournalLinkTransformer($this->parameters), 'journal_links');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
|
||||
|
||||
|
Reference in New Issue
Block a user