From 61c586d7cc2441af4150d657bda540be47d5f563 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 20 Sep 2022 02:54:10 +0200 Subject: [PATCH] make 3 routes auth_required instead of auth_desired --- files/routes/static.py | 6 ++---- files/routes/subs.py | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 2bcd6bc61..e4d5ebe90 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -181,8 +181,7 @@ def log_item(id, v): return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=types) @app.get("/directory") -@app.get("/logged_out/directory") -@auth_desired_with_logingate +@auth_required def static_megathread_index(v): return render_template("megathread_index.html", v=v) @@ -428,7 +427,6 @@ if not os.path.exists(f'files/templates/donate_{SITE_NAME}.html'): copyfile(f'files/templates/donate_rDrama.html', f'files/templates/donate_{SITE_NAME}.html') @app.get('/donate') -@app.get("/logged_out/donate") -@auth_desired_with_logingate +@auth_required def donate(v): return render_template(f'donate_{SITE_NAME}.html', v=v) \ No newline at end of file diff --git a/files/routes/subs.py b/files/routes/subs.py index a86a54831..1893616c5 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -501,8 +501,7 @@ def sub_marsey(v, sub): return redirect(f'/h/{sub}/settings') @app.get("/holes") -@app.get("/logged_out/holes") -@auth_desired_with_logingate +@auth_required def subs(v): subs = g.db.query(Sub, func.count(Submission.sub)).outerjoin(Submission, Sub.name == Submission.sub).group_by(Sub.name).order_by(func.count(Submission.sub).desc()).all() return render_template('sub/subs.html', v=v, subs=subs)