版本1.0.4 - 发布前准备

- 修复system.py缩进错误
- 优化前端页面样式(待重构)
- 改进API接口结构
- 完善文档和自动化脚本
- 平台基本功能稳定运行
This commit is contained in:
lt
2026-04-29 09:32:43 +08:00
parent 0a31ae09af
commit e1ba31afda
96 changed files with 165251 additions and 376 deletions
+9 -2
View File
@@ -183,8 +183,15 @@ def generate_packages(topic_id: str):
手动触发单个选题的发布包生成。
相当于执行 publisher.py 针对单个选题。
"""
# TODO: 实际调用 publisher.py 逻辑,这里先返回模拟响应
return {"message": "Package generation triggered", "topic_id": topic_id, "status": "pending"}
from ..core.publisher import run_publisher
result = run_publisher(topic_id)
if not result["ok"]:
raise HTTPException(status_code=500, detail=result["error"])
return {
"message": f"Package generation completed for topic {topic_id}",
"topic_id": topic_id,
"output": result.get("result", "")
}
@router.delete("/{topic_id}")
def delete_topic(topic_id: str, db: Session = Depends(get_db)):