完善后台分页与令牌刷新
This commit is contained in:
@@ -46,7 +46,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
|
||||
if deps.DB != nil {
|
||||
adminAuthRepo = adminauth.NewRepository(deps.DB, deps.Redis, jwtManager)
|
||||
}
|
||||
adminAuthService := adminauth.NewService(adminAuthRepo)
|
||||
adminAuthService := adminauth.NewService(adminAuthRepo, jwtManager)
|
||||
adminAuthHandler := adminauth.NewHandler(adminAuthService)
|
||||
var adminDashboardRepo *admindashboard.Repository
|
||||
if deps.DB != nil {
|
||||
@@ -215,6 +215,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
|
||||
{
|
||||
adminAuthRoutes.GET("/captcha", adminAuthHandler.Captcha)
|
||||
adminAuthRoutes.POST("/login", adminAuthHandler.Login)
|
||||
adminAuthRoutes.POST("/refresh", adminAuthHandler.Refresh)
|
||||
}
|
||||
|
||||
adminRoutes := api.Group("/admin", requireAdmin)
|
||||
|
||||
Reference in New Issue
Block a user