feat: default watchlist semua, login-gate fitur, CI anti-stale via /api/version
This commit is contained in:
@@ -15,7 +15,11 @@ import (
|
||||
func (s *Server) PortfolioRisk(w http.ResponseWriter, r *http.Request) {
|
||||
wl, _ := s.DB.Watchlist(s.userKey(r))
|
||||
if len(wl) == 0 {
|
||||
wl = s.Cfg.Watchlist
|
||||
if all, err := s.DB.AllTickers(); err == nil && len(all) > 0 {
|
||||
wl = all
|
||||
} else {
|
||||
wl = s.Cfg.Watchlist
|
||||
}
|
||||
}
|
||||
// Concentration: weight by latest close x assumed equal shares (seed-safe).
|
||||
type bar struct {
|
||||
|
||||
Reference in New Issue
Block a user