refactor: 简化FAQ导入结果获取逻辑

将导入结果字段合并到FAQImportProgress结构体中,当状态为completed时自动填充。删除了独立的GetLastFAQImportResult接口和相关方法,客户端改为通过进度接口获取已完成任务的结果,并使用localStorage记录最后完成的任务ID。
This commit is contained in:
wizardchen
2026-01-08 12:03:45 +08:00
parent f6aab2bc86
commit 84a4ec62de
8 changed files with 85 additions and 146 deletions
+1 -2
View File
@@ -194,8 +194,7 @@ func RegisterFAQRoutes(r *gin.RouterGroup, handler *handler.FAQHandler) {
faq.PUT("/entries/tags", handler.UpdateEntryTagBatch)
faq.DELETE("/entries", handler.DeleteEntries)
faq.POST("/search", handler.SearchFAQ)
// FAQ import result API
faq.GET("/import/last-result", handler.GetLastImportResult)
// FAQ import result display status
faq.PUT("/import/last-result/display", handler.UpdateLastImportResultDisplayStatus)
}
// FAQ import progress route (outside of knowledge-base scope)