refactor: reorganize WebSocket API route configuration for improved clarity
This commit is contained in:
@@ -92,21 +92,18 @@ func addRouter(app *iris.Application) {
|
||||
mcpHandler.ServeHTTP(w, r)
|
||||
})))
|
||||
|
||||
mvc.Configure(app.Party("/api/ws"), func(m *mvc.Application) {
|
||||
m.Router.Get("/dashboard", middleware.AuthMiddleware, services.WsService.HandleDashboardWS)
|
||||
m.Router.Get("/open", services.WsService.HandleOpenWS)
|
||||
})
|
||||
|
||||
mvc.Configure(app.Party("/api"), func(m *mvc.Application) {
|
||||
m.Party("/auth").Handle(new(api.AuthController))
|
||||
m.Party("/channel").Handle(new(api.ChannelController))
|
||||
|
||||
// m.Router.Get("/ws", middleware.OpenImWsMiddleware)
|
||||
|
||||
m.Party("/conversation", middleware.ExternalInfoMiddleware).Handle(new(api.ConversationController))
|
||||
m.Party("/message", middleware.ExternalInfoMiddleware).Handle(new(api.MessageController))
|
||||
})
|
||||
|
||||
mvc.Configure(app.Party("/api/ws"), func(m *mvc.Application) {
|
||||
m.Router.Get("/dashboard", middleware.AuthMiddleware, services.WsService.HandleDashboardWS)
|
||||
m.Router.Get("/open", services.WsService.HandleOpenWS)
|
||||
})
|
||||
|
||||
mvc.Configure(app.Party("/api/dashboard", middleware.AuthMiddleware), func(m *mvc.Application) {
|
||||
m.Party("/dashboard").Handle(new(dashboard.DashboardController))
|
||||
m.Party("/user").Handle(new(dashboard.UserController))
|
||||
|
||||
Reference in New Issue
Block a user