From a6a6a16185b1c6063cb4b86bd44c56e66a42af96 Mon Sep 17 00:00:00 2001 From: hhs <386998068@qq.com> Date: Sat, 13 Jun 2026 16:22:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Phase=206.3=20-=20=E6=B3=A8=E5=86=8C=20?= =?UTF-8?q?Session=20REST=20=E8=B7=AF=E7=94=B1=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 15029bd..9b508f2 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -10,6 +10,7 @@ import ( "github.com/gin-gonic/gin" + "github.com/hhs/camtalk/internal/api" "github.com/hhs/camtalk/internal/ai/llm" "github.com/hhs/camtalk/internal/ai/stt" "github.com/hhs/camtalk/internal/ai/tts" @@ -61,11 +62,15 @@ func main() { r.Use(gin.Recovery()) // REST API - api := r.Group("/api") + apiGroup := r.Group("/api") { - api.GET("/health", healthHandler(sessionMgr)) + apiGroup.GET("/health", healthHandler(sessionMgr)) } + // Session REST 端点 + sessionHandler := api.NewSessionHandler(sessionMgr) + sessionHandler.RegisterRoutes(apiGroup) + // WebSocket r.GET("/ws", ws.ServeWS(sessionMgr, orch))