后台登陆验证码

This commit is contained in:
yml
2026-05-22 17:20:47 +08:00
parent 6edee641fb
commit 7df557d668
12 changed files with 218 additions and 20 deletions
+2 -1
View File
@@ -41,7 +41,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
authHandler := auth.NewHandler(authService)
var adminAuthRepo *adminauth.Repository
if deps.DB != nil {
adminAuthRepo = adminauth.NewRepository(deps.DB, jwtManager)
adminAuthRepo = adminauth.NewRepository(deps.DB, deps.Redis, jwtManager)
}
adminAuthService := adminauth.NewService(adminAuthRepo)
adminAuthHandler := adminauth.NewHandler(adminAuthService)
@@ -168,6 +168,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
adminAuthRoutes := api.Group("/admin/auth")
{
adminAuthRoutes.GET("/captcha", adminAuthHandler.Captcha)
adminAuthRoutes.POST("/login", adminAuthHandler.Login)
}