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: