[34588f42] Chore: Build-Artefakte und Test-Skript hinzugefügt

- Frontend Produktions-Build aktualisiert.
- Test-Skript für Dankes-E-Mails committed.
This commit is contained in:
2026-04-17 22:14:00 +00:00
parent 806fa199ce
commit 8d7f5cbbb6
7 changed files with 77 additions and 31 deletions

View File

@@ -1 +1 @@
{"task_id": "34288f42-8544-800e-b866-dfcbc22bd4e5", "token": "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", "readme_path": "readme.md", "session_start_time": "2026-04-14T14:09:57.182458"}
{"task_id": "34588f42-8544-8046-85d4-d7895ed9b29c", "token": "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", "readme_path": null, "session_start_time": "2026-04-17T20:02:07.763496"}

View File

@@ -0,0 +1,44 @@
import sys
import os
sys.path.append('/app/fotograf-de-scraper/backend')
from database import SessionLocal, ReleaseParticipant, DiscountCode
from gmail_service import GmailService
from publish_request_api import SIGNATURE_HTML
def test_webhook_mail():
db = SessionLocal()
# Simulate data
test_email = "floke.com@gmail.com"
first_name = "Christian"
test_code = "M984AU-TEST"
# Simulate logic
service = GmailService(db)
subject = "Dankeschön für Eure Freigabe & Euer Rabattcode"
INSTRUCTIONS_IMAGE_URL = "https://mail.google.com/mail/u/2?ui=2&ik=719adaa3c5&attid=0.1&permmsgid=msg-a:r7482671925923393616&th=196e322c399dbc7f&view=fimg&fur=ip&permmsgid=msg-a:r7482671925923393616&sz=s0-l75-ft&attbid=ANGjdJ9_U6ayMFgwbupt4HalTKO867IHx6N70eNbPfQmTLNzRXilJxI-n8a1gjM8xVcP5HEOgaVxfp3FnJPzTYmEEyhK4gSU-Il_0a6OtzFYscp55_W4iyxuxjyPvK4&disp=emb&realattid=ii_maspzxv50&zw"
body_html = f"""
<p>Hallo {first_name},</p>
<p>Vielen Dank nochmal für die Freigabe zur Veröffentlichung, das ist super nett von Euch!</p>
<p>Hier ist euer Gutscheincode über 25 Euro: <strong style="font-size: 18px; color: #4F46E5;">{test_code}</strong></p>
<p>Um den Gutschein einzugeben, musst du auf den Preis des Warenkorbs drücken (über dem Button zur Kasse gehen):</p>
<p><img src="{INSTRUCTIONS_IMAGE_URL}" alt="Anleitung Gutschein einlösen" style="max-width: 100%; border: 1px solid #ddd; border-radius: 8px;"></p>
<p>Liebe Grüße,<br>das Team von Kinderfotos Erding</p>
{SIGNATURE_HTML}
"""
print(f"Sende Test-E-Mail an {test_email}...")
success = service.send_email(test_email, subject, body_html)
if success:
print("✅ E-Mail erfolgreich gesendet! Bitte prüfe dein Postfach.")
else:
print("❌ Fehler beim Senden. (Stelle sicher, dass Gmail Authentifiziert ist).")
db.close()
if __name__ == "__main__":
test_webhook_mail()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/fotograf-de/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fotograf.de ERP</title>
<script type="module" crossorigin src="/fotograf-de/assets/index-0MFhRTsS.js"></script>
<link rel="stylesheet" crossorigin href="/fotograf-de/assets/index-uaZdwVxZ.css">
<script type="module" crossorigin src="/fotograf-de/assets/index-9o0T5Jx2.js"></script>
<link rel="stylesheet" crossorigin href="/fotograf-de/assets/index-BaSYoDWO.css">
</head>
<body>
<div id="root"></div>