MCPcopy
hub / github.com/HisMax/RedInk / get_history_stats

Function get_history_stats

backend/routes/history_routes.py:312–331  ·  view source on GitHub ↗

获取历史记录统计信息 返回: - success: 是否成功 - total: 总记录数 - by_status: 按状态分组的统计

()

Source from the content-addressed store, hash-verified

310
311 @history_bp.route('/history/stats', methods=['GET'])
312 def get_history_stats():
313 """
314 获取历史记录统计信息
315
316 返回:
317 - success: 是否成功
318 - total: 总记录数
319 - by_status: 按状态分组的统计
320 """
321 try:
322 history_service = get_history_service()
323 stats = history_service.get_statistics()
324
325 return jsonify({
326 "success": True,
327 **stats
328 }), 200
329
330 except Exception as e:
331 return api_error_response(e, context={"endpoint": "/api/history/stats"})
332
333 # ==================== 扫描和同步 ====================
334

Callers

nothing calls this directly

Calls 3

get_history_serviceFunction · 0.90
api_error_responseFunction · 0.85
get_statisticsMethod · 0.80

Tested by

no test coverage detected