后台登陆验证码
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user