move some endpoints to nginx

pull/226/head
Aevann 2024-04-05 10:50:15 +02:00
parent e879b8d34a
commit 1e555d24ca
1 changed files with 0 additions and 19 deletions

View File

@ -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)