fix message posting

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

@ -8,7 +8,8 @@ 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
from suchwow.reddit import make_post
from suchwow.discord import post_discord_webhook
bp = Blueprint("post", "post")
@ -109,7 +110,10 @@ def approve(id):
if post:
post.approved = True
post.save()
post_meme(post.id)
if not post.to_reddit:
make_post(post)
if not post.to_discord:
post_discord_webhook(post)
flash("Approved")
return redirect(url_for("mod_queue"))
else:

Loading…
Cancel
Save