migu_music_server/app/other/router/sys_server_monitor.go

22 lines
560 B
Go
Raw Permalink Normal View History

2025-03-28 06:07:20 +00:00
package router
import (
"github.com/gin-gonic/gin"
jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/other/apis"
"go-admin/common/middleware"
)
func init() {
routerCheckRole = append(routerCheckRole, registerSysServerMonitorRouter)
}
// 需认证的路由代码
func registerSysServerMonitorRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
api := apis.ServerMonitor{}
r := v1.Group("/server-monitor").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
{
r.GET("", api.ServerInfo)
}
}