From 8b601027f7e2609c68802e5271bc8b5da87f476e Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 10 Dec 2020 13:12:21 -0800 Subject: [PATCH] add meme posting to approval process --- suchwow/app.py | 2 +- suchwow/routes/post.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/suchwow/app.py b/suchwow/app.py index 7a32cf3..33196e2 100644 --- a/suchwow/app.py +++ b/suchwow/app.py @@ -94,7 +94,7 @@ def post_new_memes(): @app.cli.command("post_meme") @click.argument("post_id") -def post_new_memes(post_id): +def post_meme(post_id): post = Post.get(id=post_id) if not post.to_reddit: make_post(post) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index 3f39166..ae85812 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -8,6 +8,7 @@ from suchwow import config from suchwow.models import Post, Comment from suchwow.utils.decorators import login_required, profile_required, moderator_required from suchwow.utils.helpers import allowed_file, is_moderator, get_session_user +from suchwow.app import post_meme bp = Blueprint("post", "post") @@ -108,6 +109,7 @@ def approve(id): if post: post.approved = True post.save() + post_meme(post.id) flash("Approved") return redirect(url_for("mod_queue")) else: