refactor: rename ADMIN_EMAIL -> LEADS_EMAIL for clarity
This commit is contained in:
@@ -28,7 +28,7 @@ SESSION_LIFETIME_DAYS=30
|
|||||||
# Dev login shortcut (no email needed): /auth/dev-login?email=dev@localhost
|
# Dev login shortcut (no email needed): /auth/dev-login?email=dev@localhost
|
||||||
RESEND_API_KEY=
|
RESEND_API_KEY=
|
||||||
EMAIL_FROM=hello@padelnomics.io
|
EMAIL_FROM=hello@padelnomics.io
|
||||||
ADMIN_EMAIL=leads@padelnomics.io
|
LEADS_EMAIL=leads@padelnomics.io
|
||||||
|
|
||||||
# Waitlist mode — set to true to gate routes and capture emails before launch.
|
# Waitlist mode — set to true to gate routes and capture emails before launch.
|
||||||
# Resend audiences are created automatically per blueprint (waitlist-auth,
|
# Resend audiences are created automatically per blueprint (waitlist-auth,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class Config:
|
|||||||
|
|
||||||
RESEND_API_KEY: str = os.getenv("RESEND_API_KEY", "")
|
RESEND_API_KEY: str = os.getenv("RESEND_API_KEY", "")
|
||||||
EMAIL_FROM: str = _env("EMAIL_FROM", "hello@padelnomics.io")
|
EMAIL_FROM: str = _env("EMAIL_FROM", "hello@padelnomics.io")
|
||||||
ADMIN_EMAIL: str = _env("ADMIN_EMAIL", "leads@padelnomics.io")
|
LEADS_EMAIL: str = _env("LEADS_EMAIL", "leads@padelnomics.io")
|
||||||
ADMIN_EMAILS: list[str] = [
|
ADMIN_EMAILS: list[str] = [
|
||||||
e.strip().lower() for e in os.getenv("ADMIN_EMAILS", "").split(",") if e.strip()
|
e.strip().lower() for e in os.getenv("ADMIN_EMAILS", "").split(",") if e.strip()
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ async def suppliers():
|
|||||||
)
|
)
|
||||||
# Notify admin
|
# Notify admin
|
||||||
await send_email(
|
await send_email(
|
||||||
config.ADMIN_EMAIL,
|
config.LEADS_EMAIL,
|
||||||
f"New supplier lead from {g.user['email']}",
|
f"New supplier lead from {g.user['email']}",
|
||||||
f"<p>Location: {form.get('location')}<br>Courts: {form.get('court_count')}<br>Budget: {form.get('budget')}<br>Message: {form.get('message')}</p>",
|
f"<p>Location: {form.get('location')}<br>Courts: {form.get('court_count')}<br>Budget: {form.get('budget')}<br>Message: {form.get('message')}</p>",
|
||||||
)
|
)
|
||||||
@@ -138,7 +138,7 @@ async def financing():
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
await send_email(
|
await send_email(
|
||||||
config.ADMIN_EMAIL,
|
config.LEADS_EMAIL,
|
||||||
f"New financing lead from {g.user['email']}",
|
f"New financing lead from {g.user['email']}",
|
||||||
f"<p>Location: {form.get('location')}<br>Courts: {form.get('court_count')}<br>Budget: {form.get('budget')}<br>Message: {form.get('message')}</p>",
|
f"<p>Location: {form.get('location')}<br>Courts: {form.get('court_count')}<br>Budget: {form.get('budget')}<br>Message: {form.get('message')}</p>",
|
||||||
)
|
)
|
||||||
@@ -351,7 +351,7 @@ async def quote_request():
|
|||||||
if is_verified_user:
|
if is_verified_user:
|
||||||
# Existing flow: notify admin immediately
|
# Existing flow: notify admin immediately
|
||||||
await send_email(
|
await send_email(
|
||||||
config.ADMIN_EMAIL,
|
config.LEADS_EMAIL,
|
||||||
f"[{heat.upper()}] New quote request from {contact_email}",
|
f"[{heat.upper()}] New quote request from {contact_email}",
|
||||||
f"<p><b>Heat:</b> {heat}<br>"
|
f"<p><b>Heat:</b> {heat}<br>"
|
||||||
f"<b>Contact:</b> {form.get('contact_name')} <{contact_email}><br>"
|
f"<b>Contact:</b> {form.get('contact_name')} <{contact_email}><br>"
|
||||||
@@ -483,7 +483,7 @@ async def verify_quote():
|
|||||||
heat = lead["heat_score"] or "cool"
|
heat = lead["heat_score"] or "cool"
|
||||||
contact_email = lead["contact_email"]
|
contact_email = lead["contact_email"]
|
||||||
await send_email(
|
await send_email(
|
||||||
config.ADMIN_EMAIL,
|
config.LEADS_EMAIL,
|
||||||
f"[{heat.upper()}] New quote request from {contact_email}",
|
f"[{heat.upper()}] New quote request from {contact_email}",
|
||||||
f"<p><b>Heat:</b> {heat}<br>"
|
f"<p><b>Heat:</b> {heat}<br>"
|
||||||
f"<b>Contact:</b> {lead['contact_name']} <{contact_email}><br>"
|
f"<b>Contact:</b> {lead['contact_name']} <{contact_email}><br>"
|
||||||
|
|||||||
@@ -670,7 +670,7 @@
|
|||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>My company isn’t listed. How do I get added?</summary>
|
<summary>My company isn’t listed. How do I get added?</summary>
|
||||||
<p>Email us at {{ config.ADMIN_EMAIL }} with your company details and we’ll add you to the directory within 48 hours.</p>
|
<p>Email us at {{ config.LEADS_EMAIL }} with your company details and we’ll add you to the directory within 48 hours.</p>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user