refactor: 合并 FAQ 导入和验证逻辑

This commit is contained in:
wizardchen
2026-01-06 15:17:08 +08:00
parent 100484f13d
commit a63a2a8daf
8 changed files with 240 additions and 463 deletions
-5
View File
@@ -200,11 +200,6 @@ func RegisterFAQRoutes(r *gin.RouterGroup, handler *handler.FAQHandler) {
{
faqImport.GET("/progress/:task_id", handler.GetImportProgress)
}
// FAQ dry run progress route (outside of knowledge-base scope)
faqDryRun := r.Group("/faq/dryrun")
{
faqDryRun.GET("/progress/:task_id", handler.GetDryRunProgress)
}
}
// RegisterKnowledgeBaseRoutes 注册知识库相关的路由
+1 -4
View File
@@ -76,12 +76,9 @@ func RunAsynqServer(params AsynqTaskParams) *asynq.ServeMux {
// Register document processing handler
mux.HandleFunc(types.TypeDocumentProcess, params.KnowledgeService.ProcessDocument)
// Register FAQ import handler
// Register FAQ import handler (includes dry run mode)
mux.HandleFunc(types.TypeFAQImport, params.KnowledgeService.ProcessFAQImport)
// Register FAQ dry run handler
mux.HandleFunc(types.TypeFAQDryRun, params.KnowledgeService.ProcessFAQDryRun)
// Register question generation handler
mux.HandleFunc(types.TypeQuestionGeneration, params.KnowledgeService.ProcessQuestionGeneration)