修复登录及验证码功能
This commit is contained in:
@@ -37,19 +37,19 @@ func main() {
|
||||
jm := jwt.New(cfg.JWTSecret, cfg.JWTExpireHrs)
|
||||
|
||||
// 4. 初始化 Service
|
||||
authSvc := service.NewAuthService(database.DB, jm)
|
||||
userSvc := service.NewUserService(database.DB)
|
||||
regionSvc := service.NewRegionService(database.DB)
|
||||
schoolSvc := service.NewSchoolService(database.DB)
|
||||
classSvc := service.NewClassService(database.DB)
|
||||
adminSvc := service.NewAdminService(database.DB)
|
||||
configSvc := service.NewConfigService(database.DB)
|
||||
menuSvc := service.NewMenuService(database.DB)
|
||||
|
||||
// 初始化系统默认配置
|
||||
if err := configSvc.InitDefaults(); err != nil {
|
||||
log.Printf("[config] init defaults failed: %v", err)
|
||||
}
|
||||
|
||||
authSvc := service.NewAuthService(database.DB, jm, configSvc)
|
||||
userSvc := service.NewUserService(database.DB)
|
||||
regionSvc := service.NewRegionService(database.DB)
|
||||
schoolSvc := service.NewSchoolService(database.DB)
|
||||
classSvc := service.NewClassService(database.DB, configSvc)
|
||||
adminSvc := service.NewAdminService(database.DB)
|
||||
menuSvc := service.NewMenuService(database.DB)
|
||||
// 初始化默认菜单
|
||||
if err := menuSvc.InitDefaults(); err != nil {
|
||||
log.Printf("[menu] init defaults failed: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user