Add files via upload

This commit is contained in:
公明
2026-02-09 19:20:43 +08:00
committed by GitHub
parent 772a04b715
commit 870715fc8f
6 changed files with 165 additions and 27 deletions
+12
View File
@@ -694,6 +694,18 @@ func setupRoutes(
}
app.knowledgeHandler.Search(c)
})
knowledgeRoutes.GET("/stats", func(c *gin.Context) {
if app.knowledgeHandler == nil {
c.JSON(http.StatusOK, gin.H{
"enabled": false,
"total_categories": 0,
"total_items": 0,
"message": "知识库功能未启用,请前往系统设置启用知识检索功能",
})
return
}
app.knowledgeHandler.GetStats(c)
})
}
// 漏洞管理