fix: update admin token check logic and improve comments for clarity

feat: add condition to only delete manually added stocks from DB
docs: clarify stock notes saving method and Alpaca mode indicator fetching
chore: update binary database file
This commit is contained in:
2026-05-16 22:20:29 +02:00
parent 17ba788419
commit 1eddb9173e
5 changed files with 8 additions and 5 deletions
@@ -18,7 +18,7 @@ Replace the current bare-bones settings page (a flat list of JSON textareas) wit
- `trading.stopLossPercent` - number
- `trading.riskMethod` - string ("fixed" | "percentage" | "atr")
- **Saves** via `PUT /api/admin/settings/:key` with optimistic UI update
- **Stock notes** saved via `POST /api/stocks` with ticker + notes
- **Stock notes** saved via `POST /api/stocks` with FormData: `{ ticker, notes }`
- **Loading state** shown while initial fetch completes
### Layout
@@ -48,7 +48,7 @@ Replace the current bare-bones settings page (a flat list of JSON textareas) wit
- Pagination if >20 stocks
### System
- Alpaca mode indicator (paper/live) - read-only, derived from env
- Alpaca mode indicator (paper/live) - read-only, fetched from `/api/alpaca/account` or derived from `ALPACA_BASE_URL` env var
- Admin token management
- Fallback JSON textarea for any raw `AppSetting` keys not covered above