06/05 Optimize app
This commit is contained in:
@@ -253,6 +253,18 @@ def reconcile_api():
|
||||
})
|
||||
|
||||
|
||||
@dashboard_bp.route('/api/health-score')
|
||||
@login_required
|
||||
def health_score_api():
|
||||
from app.services.health_score_service import compute_health_score
|
||||
try:
|
||||
data = compute_health_score()
|
||||
except Exception as e:
|
||||
log.warning('[dashboard] health_score_api failed: %s', e)
|
||||
return jsonify({'error': str(e)}), 500
|
||||
return jsonify(data)
|
||||
|
||||
|
||||
@dashboard_bp.route('/api/anomalies')
|
||||
@login_required
|
||||
def anomalies_api():
|
||||
|
||||
Reference in New Issue
Block a user