master
Aevann1 2022-04-18 00:16:02 +02:00
parent 8214e2c6f9
commit 0f05a76522
2 changed files with 6 additions and 5 deletions

View File

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

View File

@ -65,7 +65,8 @@
{% endif %}
{% if not err %}
<a class="mobile-nav-icon d-md-none" href="/random"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/random_post"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
{% if v and v.admin_level > 1 %}
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
{% endif %}
@ -89,7 +90,7 @@
</li>
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
<a class="nav-link" href="/random/" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random post"><i class="fas fa-random"></i></a>
<a class="nav-link" href="/random_post/" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random post"><i class="fas fa-random"></i></a>
</li>
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">