fix: 移除 未使用的OCR服务统计信息相关的API接口 Bug: system_router这里有bug

Fixes #560
This commit is contained in:
Wenjie Zhang 2026-03-16 16:33:20 +08:00
parent 4477c8d274
commit af9f57371a
2 changed files with 0 additions and 23 deletions

View File

@ -149,23 +149,6 @@ async def reload_info_config(current_user: User = Depends(get_admin_user)):
# =============================================================================
@system.get("/ocr/stats")
async def get_ocr_stats(current_user: User = Depends(get_admin_user)):
"""
获取OCR服务使用统计信息
返回各个OCR服务的处理统计和性能指标
"""
try:
from src.plugins._ocr import get_ocr_stats
stats = get_ocr_stats()
return {"status": "success", "stats": stats, "message": "OCR统计信息获取成功"}
except Exception as e:
logger.error(f"获取OCR统计信息失败: {str(e)}")
return {"status": "error", "stats": {}, "message": f"获取OCR统计信息失败: {str(e)}"}
@system.get("/ocr/health")
async def check_ocr_services_health(current_user: User = Depends(get_admin_user)):
"""

View File

@ -85,12 +85,6 @@ export const brandApi = {
// =============================================================================
export const ocrApi = {
/**
* 获取OCR服务统计信息
* @returns {Promise} - OCR统计信息
*/
getStats: async () => apiAdminGet('/api/system/ocr/stats'),
/**
* 获取OCR服务健康状态
* @returns {Promise} - OCR健康状态