whisper-money/app/Http/Controllers/Api
Víctor Falcón 0f08c0c662 Extract duplicated getCategorySpending into CategorySpendingService
DashboardController::getCategorySpending and
DashboardAnalyticsController::getCategorySpending were the same rolled-up
expense-per-category query, differing only in whether they accepted a drill
parent (the dashboard always passed the top level). Copies of a financial
aggregation on two screens are a divergence risk.

Extract App\Services\CategorySpendingService::forPeriod() with an optional
drill parent and consume it from both controllers, dropping the now-unused
CategoryTree/DB/Collection/Category imports. Behaviour-preserving: the query,
roll-up and positive-amount filter are unchanged, and existing
DashboardAnalyticsTest / DashboardTest coverage stays green.
2026-07-04 20:48:18 +02:00
..
Concerns fix(analysis): respect category types like the cashflow screen (#612) 2026-06-29 21:04:18 +02:00
AccountController.php refactor(api): standardize serialization via model $hidden (#492) 2026-06-05 13:57:34 +02:00
CashflowAnalyticsController.php Move income/expense-side classification onto the Transaction model 2026-07-04 20:48:18 +02:00
CategoryMonthlyBreakdownController.php fix(analysis): respect category types like the cashflow screen (#612) 2026-06-29 21:04:18 +02:00
DashboardAnalyticsController.php Extract duplicated getCategorySpending into CategorySpendingService 2026-07-04 20:48:18 +02:00
ImportDataController.php refactor(api): standardize serialization via model $hidden (#492) 2026-06-05 13:57:34 +02:00
SavedFilterController.php feat(analysis): project-aware transaction analysis (#513) 2026-06-09 15:32:07 +02:00
TransactionAnalysisController.php Move income/expense-side classification onto the Transaction model 2026-07-04 20:48:18 +02:00
TransactionController.php fix: address remaining security audit findings (round 2) (#628) 2026-07-03 15:04:03 +00:00