mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-26 17:01:20 -06:00
Fix issue with API
This commit is contained in:
parent
67fa4a0fc7
commit
5862b832d9
@ -57,7 +57,7 @@ class Controller extends BaseController
|
|||||||
|
|
||||||
// do not expose API on demo site:
|
// do not expose API on demo site:
|
||||||
if (true === $isDemoSite) {
|
if (true === $isDemoSite) {
|
||||||
throw new FireflyException('The API is not available on the demo site.');
|
//throw new FireflyException('The API is not available on the demo site.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// get global parameters
|
// get global parameters
|
||||||
|
@ -148,7 +148,7 @@ class AccountTransformer extends TransformerAbstract
|
|||||||
|
|
||||||
$type = $account->accountType->type;
|
$type = $account->accountType->type;
|
||||||
$role = $this->repository->getMetaValue($account, 'accountRole');
|
$role = $this->repository->getMetaValue($account, 'accountRole');
|
||||||
if (strlen($role) === 0 || $type !== AccountType::ASSET) {
|
if ($type !== AccountType::ASSET || (string)$role === '') {
|
||||||
$role = null;
|
$role = null;
|
||||||
}
|
}
|
||||||
$currencyId = (int)$this->repository->getMetaValue($account, 'currency_id');
|
$currencyId = (int)$this->repository->getMetaValue($account, 'currency_id');
|
||||||
|
Loading…
Reference in New Issue
Block a user