forked from rDrama/rDrama
fddf
parent
30f2f4c01d
commit
253b17dbdf
|
@ -34,7 +34,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
|
||||
if not v and "logged_out" not in request.path: return redirect(f"/logged_out/comment/{cid}")
|
||||
|
||||
if v and "logged_out" in request.path: return redirect(f"/comment/{cid}")
|
||||
if v and "logged_out" in request.full_path: return redirect(f"/comment/{cid}")
|
||||
|
||||
try: cid = int(cid)
|
||||
except:
|
||||
|
|
|
@ -191,7 +191,7 @@ def front_all(v):
|
|||
|
||||
if not v and request.path == "/": return redirect("/logged_out")
|
||||
|
||||
if v and "logged_out" in request.path: return redirect("/")
|
||||
if v and "logged_out" in request.full_path: return redirect("/")
|
||||
|
||||
try: page = int(request.args.get("page") or 1)
|
||||
except: abort(400)
|
||||
|
|
|
@ -53,7 +53,7 @@ def post_id(pid, anything=None, v=None):
|
|||
|
||||
if not v and "logged_out" not in request.path: return redirect(f"/logged_out/post/{pid}")
|
||||
|
||||
if v and "logged_out" in request.path: return redirect(f"/post/{pid}")
|
||||
if v and "logged_out" in request.full_path: return redirect(f"/post/{pid}")
|
||||
|
||||
try: pid = int(pid)
|
||||
except Exception as e: pass
|
||||
|
|
|
@ -281,7 +281,7 @@ def u_username(username, v=None):
|
|||
|
||||
if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}")
|
||||
|
||||
if v and "logged_out" in request.path: return redirect(f"/@{username}")
|
||||
if v and "logged_out" in request.full_path: return redirect(f"/@{username}")
|
||||
|
||||
# username is unique so at most this returns one result. Otherwise 404
|
||||
|
||||
|
@ -402,7 +402,7 @@ def u_username_comments(username, v=None):
|
|||
|
||||
if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}/comments")
|
||||
|
||||
if v and "logged_out" in request.path: return redirect(f"/@{username}/comments")
|
||||
if v and "logged_out" in request.full_path: return redirect(f"/@{username}/comments")
|
||||
|
||||
# username is unique so at most this returns one result. Otherwise 404
|
||||
|
||||
|
|
Loading…
Reference in New Issue