feat: log output in ws mode
This commit is contained in:
1 parent
a2f1721ee1
commit
2c8c7688b4
3 files changed
+125
-47
No files matched your search
+6
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user