fix(email): Added diskription message to email

This commit is contained in:
Black_Raven committed 2026-04-07 19:43:50 +03:00
1 parent d10a5666ba
commit 9c59674158
2 files changed
+7 -2

No files matched your search

+5 -1
View File
@@ -16,12 +16,16 @@ def post_email():
name = data.get('name')
phone = data.get('phone')
email = data.get('email')
message = data.get('message')
if not name or not phone or not email:
return jsonify({"error": "Missing required fields: name, phone, email"}), 400
if not message:
message = "Не содержит текста заявки"
# Отправляем заявку на почту
success = send_lead_to_email(name, phone, email)
success = send_lead_to_email(name, phone, email, message)
if success:
return jsonify({"status": "success", "message": "Lead sent successfully"}), 200