whisper-money/app/Http/Controllers/Api
Víctor Falcón 6abec95d0e
feat: Decrypt encrypted transactions on key unlock (#123)
## Summary

- Add `GET /api/transactions?encrypted=true` endpoint for paginated
listing of encrypted transactions
- Add `PATCH /api/transactions/bulk` endpoint for batch-updating
decrypted transaction data (max 50 per request, bypasses model events)
- Add `useDecryptTransactions` hook that mirrors the existing account
name decryption flow: fetches encrypted transactions page-by-page,
decrypts `description`/`notes` client-side via Web Crypto API, sends
plaintext back and clears IVs
- Wire the hook into `AppSidebarLayout` so decryption runs automatically
when the user unlocks their encryption key
- Once all transactions (and accounts) are decrypted, the encryption key
button in the header disappears automatically

## Test plan

- [x] 11 Pest tests covering encrypted/plaintext filtering, pagination,
user scoping, bulk update, authorization, validation, nullable notes,
guest access, and no-model-events behavior
- [x] Manual: create encrypted transactions, unlock encryption key,
verify transactions get decrypted and the key button disappears
2026-02-16 10:37:43 +01:00
..
AccountController.php Remove encryption from bank account names (#104) 2026-02-09 14:15:26 +01:00
CashflowAnalyticsController.php test: Fix Carbon month overflow in date calculations (#87) 2026-02-01 11:33:09 +01:00
DashboardAnalyticsController.php Remove encryption from bank account names (#104) 2026-02-09 14:15:26 +01:00
ImportDataController.php Remove encryption from bank account names (#104) 2026-02-09 14:15:26 +01:00
TransactionController.php feat: Decrypt encrypted transactions on key unlock (#123) 2026-02-16 10:37:43 +01:00