chore: smoke tmpdir hygiene, seed pw floor, README

This commit is contained in:
2026-09-07 12:44:47 +08:00
parent 93638ed647
commit e0783e5e6a
4 changed files with 55 additions and 6 deletions
+4
View File
@@ -15,6 +15,10 @@ func Admin(ctx context.Context, s *store.Store, user, pass string) error {
if user == "" || pass == "" {
return nil
}
if len(pass) < 8 { // 与 API 建户口令下限一致
log.Printf("seed admin skipped: ADMIN_PASSWORD must be >= 8 chars")
return nil
}
n, err := s.CountUsers(ctx)
if err != nil || n > 0 {
return err