New routes and a fix for account types.

This commit is contained in:
James Cole 2020-07-19 13:04:41 +02:00
parent 3b56f4271e
commit 78107b1212
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
3 changed files with 11 additions and 2 deletions

View File

@ -616,7 +616,7 @@ return [
'allowed_opposing_types' => [
'source' => [
AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE,
AccountType::LOAN, AccountType::RECONCILIATION,],
AccountType::LOAN, AccountType::RECONCILIATION, AccountType::MORTGAGE],
AccountType::CASH => [AccountType::ASSET],
AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE,],

View File

@ -56,6 +56,15 @@ Route::group(
}
);
Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers\Autocomplete', 'prefix' => 'autocomplete',
'as' => 'api.v1.autocomplete.',],
static function () {
// Auto complete routes
Route::get('accounts', ['uses' => 'AccountController@accounts', 'as' => 'accounts']);
}
);
Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'groups',
'as' => 'api.v1.object-groups.',],

View File

@ -604,7 +604,7 @@ Route::group(
static function () {
// for auto complete
Route::get('accounts', ['uses' => 'Json\AutoCompleteController@accounts', 'as' => 'autocomplete.accounts']);
//Route::get('accounts', ['uses' => 'Json\AutoCompleteController@accounts', 'as' => 'autocomplete.accounts']);
Route::get('revenue-accounts', ['uses' => 'Json\AutoCompleteController@revenueAccounts', 'as' => 'autocomplete.revenue-accounts']);
Route::get('expense-accounts', ['uses' => 'Json\AutoCompleteController@expenseAccounts', 'as' => 'autocomplete.expense-accounts']);
Route::get('asset-accounts', ['uses' => 'Json\AutoCompleteController@assetAccounts', 'as' => 'autocomplete.asset-accounts']);