feat: default watchlist semua, login-gate fitur, CI anti-stale via /api/version

This commit is contained in:
asepharyana
2026-09-15 22:12:09 +07:00
parent 5c953289b1
commit 79f42dfefa
22 changed files with 602 additions and 84 deletions
+7 -2
View File
@@ -61,9 +61,14 @@ func main() {
}
}
}
// Ensure the demo watchlist exists even without a seed bundle.
// Ensure the demo account covers the "semua" default: every ticker with
// stored data (fallback: config watchlist).
if wl, _ := db.Watchlist(cfg.DemoUserKey); len(wl) == 0 {
for _, t := range cfg.Watchlist {
seeds, _ := db.AllTickers()
if len(seeds) == 0 {
seeds = cfg.Watchlist
}
for _, t := range seeds {
_ = db.AddWatch(cfg.DemoUserKey, t)
}
}