notify admin when new app gets created

This commit is contained in:
Son NK 2019-08-03 16:49:40 +02:00
parent 4e67275071
commit 117f4110f8
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from flask_wtf import FlaskForm
from wtforms import StringField, validators
from app.developer.base import developer_bp
from app.email_utils import notify_admin
from app.extensions import db
from app.models import Client
@ -21,6 +22,8 @@ def new_client():
if form.validate():
client = Client.create_new(form.name.data, current_user.id)
db.session.commit()
notify_admin(f"user {current_user} created new app {client.name}")
flash("Your app has been created", "success")
return redirect(