feat: log output in ws mode

This commit is contained in:
zhangwenjian committed 2020-08-20 23:31:46 +08:00
1 parent a2f1721ee1
commit 2c8c7688b4
3 files changed
+125 -47

No files matched your search

+6 -3
View File
@@ -45,9 +45,6 @@ func sysBaseRouter(r *gin.RouterGroup) {
r.GET("/", system.HelloWorld)
r.GET("/ws", ws.WebsocketManager.WsClient)
r.GET("/info", handler.Ping)
}
@@ -127,6 +124,12 @@ func sysCheckRoleRouterInit(r *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle
// Refresh time can be longer than token timeout
r.GET("/refresh_token", authMiddleware.RefreshHandler)
r.Group("").Use(authMiddleware.MiddlewareFunc()).GET("/ws/:id/:channel", ws.WebsocketManager.WsClient)
r.Group("").Use(authMiddleware.MiddlewareFunc()).GET("/wslogout/:id/:channel", ws.WebsocketManager.UnWsClient)
v1 := r.Group("/api/v1")
registerPageRouter(v1, authMiddleware)