From 14f3e7b2763393f3f4ed67327b254216e8ae9546 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 24 Sep 2021 22:08:40 +0200 Subject: [PATCH] fds --- files/routes/comments.py | 2 +- files/routes/front.py | 2 +- files/routes/posts.py | 2 +- files/routes/users.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 089e998500..7b039567fd 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -25,7 +25,7 @@ beams_client = PushNotifications( @auth_desired def post_pid_comment_cid(cid, pid=None, anything=None, v=None): - if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out/comment/{cid}") + if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}") if v and request.full_path.startswith('/logged_out'): v = None diff --git a/files/routes/front.py b/files/routes/front.py index 8ccc0d2b14..25f99bfc40 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -202,7 +202,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' @auth_desired def front_all(v): - if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect("/logged_out") + if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") if v and "logged_out" in request.full_path: v = None diff --git a/files/routes/posts.py b/files/routes/posts.py index 67cb605448..0a90a7207c 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -86,7 +86,7 @@ def submit_get(v): @auth_desired def post_id(pid, anything=None, v=None): - if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): return redirect(f"/logged_out/post/{pid}") + if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") if v and request.full_path.startswith('/logged_out'): v = None diff --git a/files/routes/users.py b/files/routes/users.py index 6e4e50cd85..1755c6ec17 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -391,7 +391,7 @@ def visitors(v): def u_username(username, v=None): - if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}") + if not v and "logged_out" not in request.path: return redirect(f"/logged_out{request.full_path}") if v and "logged_out" in request.full_path: v = None @@ -504,7 +504,7 @@ def u_username(username, v=None): 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 not v and "logged_out" not in request.path: return redirect(f"/logged_out{request.full_path}") if v and "logged_out" in request.full_path: v = None