make 3 routes auth_required instead of auth_desired

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-20 02:54:10 +02:00
parent 4560b12835
commit 61c586d7cc
2 changed files with 3 additions and 6 deletions

View File

@ -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)

View File

@ -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)