mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
fix message posting
This commit is contained in:
parent
8b601027f7
commit
b7403c945a
1 changed files with 6 additions and 2 deletions
|
@ -8,7 +8,8 @@ from suchwow import config
|
||||||
from suchwow.models import Post, Comment
|
from suchwow.models import Post, Comment
|
||||||
from suchwow.utils.decorators import login_required, profile_required, moderator_required
|
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.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")
|
bp = Blueprint("post", "post")
|
||||||
|
@ -109,7 +110,10 @@ def approve(id):
|
||||||
if post:
|
if post:
|
||||||
post.approved = True
|
post.approved = True
|
||||||
post.save()
|
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")
|
flash("Approved")
|
||||||
return redirect(url_for("mod_queue"))
|
return redirect(url_for("mod_queue"))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue