add meme posting to approval process

graphs-n-shit
lza_menace 4 years ago
parent aff9f89640
commit 8b601027f7

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

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

Loading…
Cancel
Save