dfdf
parent
f88be9a205
commit
80224309f0
|
@ -34,6 +34,8 @@ 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}")
|
||||
|
||||
try: cid = int(cid)
|
||||
except:
|
||||
try: cid = int(cid, 36)
|
||||
|
|
|
@ -53,6 +53,8 @@ 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}")
|
||||
|
||||
try: pid = int(pid)
|
||||
except Exception as e: pass
|
||||
|
||||
|
|
|
@ -281,6 +281,8 @@ 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}")
|
||||
|
||||
# username is unique so at most this returns one result. Otherwise 404
|
||||
|
||||
# case insensitive search
|
||||
|
@ -400,6 +402,8 @@ 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")
|
||||
|
||||
# username is unique so at most this returns one result. Otherwise 404
|
||||
|
||||
# case insensitive search
|
||||
|
|
Loading…
Reference in New Issue