mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
Merge pull request #994 from simple-login/remove-admin-notif
no need to notify admin when someone uses a coupon
This commit is contained in:
commit
d86a7877a8
@ -4,10 +4,9 @@ from flask_login import login_required, current_user
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, validators
|
||||
|
||||
from app.config import ADMIN_EMAIL, PADDLE_VENDOR_ID, PADDLE_COUPON_ID
|
||||
from app.config import PADDLE_VENDOR_ID, PADDLE_COUPON_ID
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.db import Session
|
||||
from app.email_utils import send_email
|
||||
from app.log import LOG
|
||||
from app.models import (
|
||||
ManualSubscription,
|
||||
@ -98,18 +97,6 @@ def coupon_route():
|
||||
"success",
|
||||
)
|
||||
|
||||
# notify admin
|
||||
if coupon.is_giveaway:
|
||||
subject = f"User {current_user} applies a (free) coupon"
|
||||
else:
|
||||
subject = f"User {current_user} applies a (paid, {coupon.comment or ''}) coupon"
|
||||
send_email(
|
||||
ADMIN_EMAIL,
|
||||
subject=subject,
|
||||
plaintext="",
|
||||
html="",
|
||||
)
|
||||
|
||||
return redirect(url_for("dashboard.index"))
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user