jesus christ im an idiot
This commit is contained in:
parent
f06fee1414
commit
87e4bb59df
4 changed files with 13 additions and 0 deletions
|
@ -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 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)
|
try: cid = int(cid)
|
||||||
except: abort(404)
|
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"):
|
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}")
|
return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||||
|
|
||||||
|
if v and request.path.startswith('/logged_out'): v = None
|
||||||
|
|
||||||
try: pid = int(pid)
|
try: pid = int(pid)
|
||||||
except Exception as e: pass
|
except Exception as e: pass
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,8 @@ def marsey_list():
|
||||||
def terms(v):
|
def terms(v):
|
||||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
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)
|
return render_template("terms.html", v=v)
|
||||||
|
|
||||||
@app.get('/sidebar')
|
@app.get('/sidebar')
|
||||||
|
@ -48,6 +50,8 @@ def terms(v):
|
||||||
def sidebar(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 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)
|
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 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)
|
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 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)
|
user = get_user(username, v=v)
|
||||||
|
|
||||||
if username != user.username: return redirect(f'{SITE_FULL}/@{user.username}/comments')
|
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):
|
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 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)
|
x=get_account(id)
|
||||||
return redirect(x.profile_url)
|
return redirect(x.profile_url)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue