【P0】前端API路径全量迁移 - 从/template-editors/{planId}改到/templates/{templateId}/editor #664

Closed
opened 2026-07-21 00:43:16 +08:00 by xiaoxia · 0 comments
Owner

问题

Phase 3 后端已完成路由迁移,旧 /edit-plans/ 路由全部删除,新路由统一为 /templates/{template_id}/editor/... 格式。

但前端仍在调用 /template-editors/{planId}/ 旧路径(API文件 editPlans.ts),导致编辑器全链路404。

方案:从根上彻底改,不要兼容层

直接把前端所有API调用从 /template-editors/{planId}/ 迁移到 /templates/{templateId}/editor/,一次改到位。

改动范围

  1. API层:editPlans.ts 改名为 templateEditor.ts,所有路径迁移
  2. 调用方:editing-planner 页面、generate 页面、各组件和hooks
  3. 命名:planId → templateId,editPlan → templateEditor
  4. API文件数量约 20+ 个端点全部迁移

原则

  • 不搞兼容层、不打补丁
  • 一次改干净,命名和路径都对齐后端
  • 改完 staging 全链路验证通过再合并

优先级

P0 - staging编辑器全链路挂了,必须立即修

## 问题 Phase 3 后端已完成路由迁移,旧 /edit-plans/ 路由全部删除,新路由统一为 /templates/{template_id}/editor/... 格式。 但前端仍在调用 /template-editors/{planId}/ 旧路径(API文件 editPlans.ts),导致编辑器全链路404。 ## 方案:从根上彻底改,不要兼容层 直接把前端所有API调用从 /template-editors/{planId}/ 迁移到 /templates/{templateId}/editor/,一次改到位。 ## 改动范围 1. API层:editPlans.ts 改名为 templateEditor.ts,所有路径迁移 2. 调用方:editing-planner 页面、generate 页面、各组件和hooks 3. 命名:planId → templateId,editPlan → templateEditor 4. API文件数量约 20+ 个端点全部迁移 ## 原则 - 不搞兼容层、不打补丁 - 一次改干净,命名和路径都对齐后端 - 改完 staging 全链路验证通过再合并 ## 优先级 P0 - staging编辑器全链路挂了,必须立即修
xiaoxia added this to the Phase 9 - 视频生成与导出 milestone 2026-07-21 00:43:16 +08:00
xiaoxia changed title from 【P0】前后端API路径不匹配 - 前端调/template-editors/后端已删,编辑器全链路404 to 【P0】前端API路径全量迁移 - 从/template-editors/{planId}改到/templates/{templateId}/editor 2026-07-21 00:45:14 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoxia/xiaoxia-saas#664