forked from MarseyWorld/MarseyWorld
jesus christ im an idiot
parent
b953f49a8a
commit
b7ab468ae0
|
@ -71,6 +71,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
|
|||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
try: cid = int(cid)
|
||||
except: abort(404)
|
||||
|
||||
|
|
|
@ -152,6 +152,8 @@ def post_id(pid, anything=None, v=None, sub=None):
|
|||
if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"):
|
||||
return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
try: pid = int(pid)
|
||||
except Exception as e: pass
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ def marsey_list():
|
|||
def terms(v):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
return render_template("terms.html", v=v)
|
||||
|
||||
@app.get('/sidebar')
|
||||
|
@ -48,6 +50,8 @@ def terms(v):
|
|||
def sidebar(v):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
return render_template('sidebar.html', v=v)
|
||||
|
||||
|
||||
|
|
|
@ -689,6 +689,7 @@ def u_username(username, v=None):
|
|||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
|
||||
u = get_user(username, v=v)
|
||||
|
@ -786,6 +787,8 @@ def u_username_comments(username, v=None):
|
|||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
user = get_user(username, v=v)
|
||||
|
||||
if username != user.username: return redirect(f'{SITE_FULL}/@{user.username}/comments')
|
||||
|
@ -971,6 +974,8 @@ def remove_follow(username, v):
|
|||
def user_profile_uid(v, id):
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
x=get_account(id)
|
||||
return redirect(x.profile_url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue