Catch some amounts

This commit is contained in:
James Cole
2023-12-29 19:59:19 +01:00
parent e47110607c
commit 33b95b9371
20 changed files with 161 additions and 154 deletions

View File

@@ -34,7 +34,9 @@ Route::group(
Route::get('basic', ['uses' => 'BasicController@basic', 'as' => 'basic']);
}
);
// V2 API route for TransactionList API endpoints
// V2 API route for all kinds of Transaction lists.
// A lot of endpoints involve transactions. So any time Firefly III needs to list transactions
// it's coming from these endpoints.
Route::group(
[
'namespace' => 'FireflyIII\Api\V2\Controllers\Transaction\List',
@@ -42,7 +44,11 @@ Route::group(
'as' => 'api.v2.',
],
static function (): void {
// basic list
Route::get('transactions', ['uses' => 'TransactionController@list', 'as' => 'transactions.list']);
// list by parent or related object.
// note how the check is done on the user group, not the user itself.
Route::get('accounts/{userGroupAccount}/transactions', ['uses' => 'AccountController@list', 'as' => 'accounts.transactions']);
}
);
@@ -152,6 +158,7 @@ Route::group(
);
// V2 API route for budgets and budget limits:
// TODO Validate from here down.
Route::group(
[
'namespace' => 'FireflyIII\Api\V2\Controllers\Model',