diff --git a/api/cmd/main.go b/api/cmd/main.go index c1fb0264..541960cc 100644 --- a/api/cmd/main.go +++ b/api/cmd/main.go @@ -781,13 +781,14 @@ func setupRoutes(router *gin.Engine, h *api.Handler, userHandler *handlers.UserH ws := router.Group("/api/v1/ws") ws.Use(authMiddleware) { - ws.GET("/sessions", h.SessionsWebSocket) + // NOTE: /ws/sessions is now handled by websocketHandler.RegisterRoutes() below ws.GET("/cluster", operatorMiddleware, h.ClusterWebSocket) ws.GET("/logs/:namespace/:pod", operatorMiddleware, h.LogsWebSocket) ws.GET("/enterprise", handlers.HandleEnterpriseWebSocket) // Real-time enterprise features } // Real-time updates via WebSocket - using dedicated handler (all authenticated users) + // Registers: /ws/sessions, /ws/notifications, /ws/metrics, /ws/alerts websocketHandler.RegisterRoutes(router.Group("/api/v1", authMiddleware)) // Webhook endpoints (HMAC signature validation required) diff --git a/api/internal/handlers/activity.go b/api/internal/handlers/activity.go index 2aed8e00..822bf0a1 100644 --- a/api/internal/handlers/activity.go +++ b/api/internal/handlers/activity.go @@ -72,7 +72,8 @@ func (h *ActivityHandler) RegisterRoutes(router *gin.RouterGroup) { sessions := router.Group("/sessions") { sessions.POST("/:id/heartbeat", h.RecordHeartbeat) - sessions.GET("/:id/activity", h.GetActivity) + // NOTE: GET /:id/activity is now handled by SessionActivityHandler + // which provides more comprehensive activity tracking with database persistence } }