From 0f05a76522f222535486202b8d93dc36420bcd67 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 18 Apr 2022 00:16:02 +0200 Subject: [PATCH] fds --- files/routes/front.py | 6 +++--- files/templates/header.html | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index d2eb334ef..c6993c5fd 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -486,7 +486,7 @@ def changeloglist(v=None, sort="new", page=1 ,t="all"): return [x[0] for x in posts] -@app.get("/random") +@app.get("/random_post") @auth_required def random_post(v): @@ -495,7 +495,7 @@ def random_post(v): if p: p = p[0] else: abort(404) - return redirect(f"/post/{p.id}") + return redirect(f"/post/{p}") @app.get("/random_user") @@ -507,7 +507,7 @@ def random_user(v): if u: u = u[0] else: abort(404) - return redirect(f"/@{x}") + return redirect(f"/@{u}") @app.get("/comments") diff --git a/files/templates/header.html b/files/templates/header.html index 952984a98..b63f14006 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -65,7 +65,8 @@ {% endif %} {% if not err %} - + + {% if v and v.admin_level > 1 %} {% endif %} @@ -89,7 +90,7 @@