From 1e555d24ca25fe8e5b613087b7eae299ce743c3c Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 5 Apr 2024 10:50:15 +0200 Subject: [PATCH] move some endpoints to nginx --- files/routes/static.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 38e138332..d9f67431a 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -167,25 +167,6 @@ def participation_stats(v): if v.client: return stats return render_template("stats.html", v=v, title="Statistics", stats=stats) -@app.get("/chart") -@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) -def chart(): - return redirect('/weekly_chart') - -@app.get("/weekly_chart.webp") -@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) -@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) -@auth_required -def weekly_chart(v): - return send_file(statshelper.chart_path(kind="weekly", site=SITE)) - -@app.get("/daily_chart.webp") -@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) -@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) -@auth_required -def daily_chart(v): - return send_file(statshelper.chart_path(kind="daily", site=SITE)) - @app.get("/admin/patrons") @app.get("/admin/paypigs") @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)