forked from MarseyWorld/MarseyWorld
fds
parent
8214e2c6f9
commit
0f05a76522
|
@ -486,7 +486,7 @@ def changeloglist(v=None, sort="new", page=1 ,t="all"):
|
||||||
return [x[0] for x in posts]
|
return [x[0] for x in posts]
|
||||||
|
|
||||||
|
|
||||||
@app.get("/random")
|
@app.get("/random_post")
|
||||||
@auth_required
|
@auth_required
|
||||||
def random_post(v):
|
def random_post(v):
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ def random_post(v):
|
||||||
if p: p = p[0]
|
if p: p = p[0]
|
||||||
else: abort(404)
|
else: abort(404)
|
||||||
|
|
||||||
return redirect(f"/post/{p.id}")
|
return redirect(f"/post/{p}")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/random_user")
|
@app.get("/random_user")
|
||||||
|
@ -507,7 +507,7 @@ def random_user(v):
|
||||||
if u: u = u[0]
|
if u: u = u[0]
|
||||||
else: abort(404)
|
else: abort(404)
|
||||||
|
|
||||||
return redirect(f"/@{x}")
|
return redirect(f"/@{u}")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/comments")
|
@app.get("/comments")
|
||||||
|
|
|
@ -65,7 +65,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not err %}
|
{% 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 %}
|
{% 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>
|
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -89,7 +90,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
<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>
|
||||||
|
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
||||||
|
|
Loading…
Reference in New Issue