From 42af653ff30468cc65661476f2867a852c5a0bf6 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 3 Dec 2020 23:30:49 -0800 Subject: [PATCH] reenable posting and use helper more --- suchwow/routes/post.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index aab11fc..ec3cad6 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -56,10 +56,8 @@ def read(id): @login_required @profile_required def create(): - flash("Posting is paused for a little while because people want to be rude and spammy.") - return redirect("/") if request.method == "POST": - submitter = session["auth"]["preferred_username"] + submitter = get_session_user() if submitter in config.BANNED_USERS: reason = config.BANNED_USERS[submitter] flash(f"You can't post for now: {reason}") @@ -120,7 +118,7 @@ def approve(id): @login_required def delete(id): filtered = Post.filter(id=id) - user = session["auth"]["preferred_username"] + user = get_session_user() if filtered: post = filtered.first() if user == post.submitter: