fix: 修复第二轮回归发现的已知 BUG

## 修复清单

### 后端路由修复
1.  — 新增 GET 路由与现有 POST 并存
   - 前端 widget.html 原使用 GET 调用但路由仅注册 POST,导致 404
   - 修复: 注册 GET + POST 双路由,handler 支持 query param + JSON body

### 前端修复
2.  — Config 调用方式修正
   - GET /api/v1/widget/config?website_token= → POST /api/v1/widget/config
   - 发送 JSON body: {"website_token":"..."}
   - 后端 Config handler 已同时支持两种调用方式

### 文档更新
3. 修正测试计划 §13.7 已知未实现端点状态
   - 标记 4 项已验证正常(copilot/config、agent_bot_inboxes/、reports/overview)
   - 标记 2 项已修复(widget/config GET+POST)
   - 保留 1 项 P3 未实现(conversation_workflows 需完整 CRUD handler)

### 已验证非 BUG 项
- 仪表盘会话计数的0问题:实际显示 1/13/14 ✅(之前为 stale snapshot)
- 会话列表为空:filter status=open 过滤掉 snoozed 会话 ✅(设计如此)
- Reports API:正确路由 /reports?metric=&since=&until= ✅
This commit is contained in:
Rogee
2026-07-28 21:46:53 +08:00
parent c3fbb9b908
commit dccd4b93f7
3 changed files with 15 additions and 7 deletions
+1
View File
@@ -2172,6 +2172,7 @@ func registerChatwootWidgetRoutes(g *gin.RouterGroup, h *Handlers) {
g.POST("/direct_uploads", h.Upload.DirectUpload)
g.PUT("/direct_uploads/:upload_uuid", h.Upload.CompleteWidgetDirectUpload)
g.POST("/config", h.Widget.Config)
g.GET("/config", h.Widget.Config)
g.GET("/campaigns", h.Widget.ListCampaigns)
g.POST("/events", h.Widget.CreateEvent)