chore: smoke tmpdir hygiene, seed pw floor, README
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user