mirror of
https://github.com/simple-login/app.git
synced 2025-03-11 15:13:19 +08:00
notify admin when new app gets created
This commit is contained in:
parent
4e67275071
commit
117f4110f8
1 changed files with 3 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue