添加默认系统管理员账号并限制唯一

This commit is contained in:
2026-07-04 09:53:57 +08:00
parent 323f50bfc0
commit 5a50af66bf
4 changed files with 52 additions and 8 deletions
+4
View File
@@ -30,6 +30,10 @@ func main() {
log.Fatalf("seed roles: %v", err)
}
if err := models.SeedSystemAdmin(database); err != nil {
log.Fatalf("seed system admin: %v", err)
}
r := routes.Setup(cfg, database)
addr := fmt.Sprintf("0.0.0.0:%s", cfg.Port)