瀏覽代碼

notify admin when new app gets created

Son NK 6 年之前
父節點
當前提交
117f4110f8
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/developer/views/new_client.py

+ 3 - 0
app/developer/views/new_client.py

@@ -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(