From e44e55af53c2fc18bca3dfe4075fbf4d4dc03fec Mon Sep 17 00:00:00 2001 From: elpatron Date: Fri, 25 Jul 2025 11:25:26 +0200 Subject: [PATCH] Entfernt: redundanter /monitor-Endpunkt, da /api/monitor identische Funktion bietet --- app.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app.py b/app.py index 3ac2de2..3ef367b 100644 --- a/app.py +++ b/app.py @@ -169,25 +169,6 @@ def stats(): api_counts[api] = api_counts.get(api, 0) + 1 return render_template('stats_dashboard.html', pageviews=pageviews, func_counts=func_counts, impressions_per_day=impressions_per_day, api_counts=api_counts) - -@app.route('/monitor') -def monitor(): - log_path = os.path.join('log', 'pageviews.log') - pageviews = 0 - if os.path.exists(log_path): - with open(log_path, encoding='utf-8') as f: - for line in f: - if 'PAGEVIEW' in line: - pageviews += 1 - uptime = int(time.time() - app_start_time) - return jsonify({ - "status": "ok", - "message": "App running", - "time": datetime.now().isoformat(), - "uptime_seconds": uptime, - "pageviews_last_7_days": pageviews - }) - # --- REST API --- def log_api_usage(api_name): log_dir = 'log'