diff --git a/.env.example b/.env.example index 1030b5b..38cebe6 100644 --- a/.env.example +++ b/.env.example @@ -6,4 +6,6 @@ EMAIL_FROM="noreply@lauf-fuer-kaya.de" EMAIL_REPLYTO="info@lauf-fuer-kaya.de" REDIS_URL=redis://localhost:6379 FRONTEND_URL="https://run.lauf-fuer-kaya.de" -AUTHKEY="" \ No newline at end of file +AUTHKEY="" +EVENT_DATE="23.05.2025" +EVENT_NAME="Lauf fΓΌr Kaya! 2025" \ No newline at end of file diff --git a/README.md b/README.md index 72d2732..b4f98e8 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,9 @@ EMAIL_FROM="noreply@lauf-fuer-kaya.de" EMAIL_REPLYTO="info@lauf-fuer-kaya.de" REDIS_URL=redis://localhost:6379 FRONTEND_URL="https://run.lauf-fuer-kaya.de" +AUTHKEY="" +EVENT_DATE="23.05.2025" +EVENT_NAME="Lauf fΓΌr Kaya! 2025" ``` ## πŸ› οΈ Development diff --git a/src/routes/email.ts b/src/routes/email.ts index c252e57..33b7c93 100644 --- a/src/routes/email.ts +++ b/src/routes/email.ts @@ -33,7 +33,7 @@ async function generateBarcodeDataURL(data) { return dataURL; } -emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }),zValidator('json', sendEmailSchema), async (c) => { +emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }), zValidator('json', sendEmailSchema), async (c) => { let { to, templateName, language, data } = c.req.valid('json') try { @@ -54,6 +54,8 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }),zValidator('jso return c.json({ success: false, error: "'data.token' not provided" }, 406) } } + data.event_date = process.env.EVENT_DATE + data.event_name = process.env.EVENT_NAME await emailService.sendEmail({ to, subject: template.subject(data), @@ -68,7 +70,7 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }),zValidator('jso }) // Add queue status endpoint -emailRouter.get('/status', bearerAuth({ token: process.env.AUTHKEY }),async (c) => { +emailRouter.get('/status', bearerAuth({ token: process.env.AUTHKEY }), async (c) => { try { const status = await emailService.getQueueStatus() return c.json(status) diff --git a/src/templates/password-reset/de.subject.txt b/src/templates/password-reset/de.subject.txt index f5a90d4..2709d73 100644 --- a/src/templates/password-reset/de.subject.txt +++ b/src/templates/password-reset/de.subject.txt @@ -1 +1 @@ -Lauf fΓΌr Kaya! Passwort Reset \ No newline at end of file +Lauf fΓΌr Kaya! - Passwort Reset \ No newline at end of file diff --git a/src/templates/password-reset/en.subject.txt b/src/templates/password-reset/en.subject.txt index 86c8fbc..6d23abb 100644 --- a/src/templates/password-reset/en.subject.txt +++ b/src/templates/password-reset/en.subject.txt @@ -1 +1 @@ -Lauf fΓΌr Kaya! Password Reset \ No newline at end of file +Lauf fΓΌr Kaya! - Password Reset \ No newline at end of file diff --git a/src/templates/welcome/de.html b/src/templates/welcome/de.html index 104a962..6281d54 100644 --- a/src/templates/welcome/de.html +++ b/src/templates/welcome/de.html @@ -66,7 +66,7 @@ " id="__react-email-preview" > - Willkommen beim Lauf fΓΌr Kaya! 2025 πŸƒβ€β™‚οΈπŸŒ + Willkommen beim {{event_name}} πŸƒβ€β™‚οΈπŸŒ
Β β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»Ώ
@@ -130,7 +130,7 @@ font-weight: 700; " > - Willkommen beim Lauf fΓΌr Kaya! 2025 + Willkommen beim {{event_name}}

- vielen Dank fΓΌr deine Registrierung beim Lauf fΓΌr Kaya! 2025 + vielen Dank fΓΌr deine Registrierung beim {{event_name}}

- Am Lauftag (23.05.2025) musst du nur noch diesen + Am Lauftag ({{event_date}}) musst du nur noch diesen Barcode vorzeigen, damit erhΓ€ltst du deine LΓ€uferkarte.

- Welcome to Lauf fΓΌr Kaya! 2025 πŸƒβ€β™‚οΈπŸŒ + Welcome to {{event_name}} πŸƒβ€β™‚οΈπŸŒ
Β β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»ΏΒ β€Œβ€‹β€β€Žβ€ο»Ώ
@@ -130,7 +130,7 @@ font-weight: 700; " > - Welcome to Lauf fΓΌr Kaya! 2025 + Welcome to {{event_name}}

- Thank you for registering for the Lauf fΓΌr Kaya! 2025 + Thank you for registering for the {{event_name}}

- On the day of the run (23.05.2025) you only have to show your barcode to receive your runner's card. + On the day of the run ({{event_date}}) you only have to show your barcode to receive your runner's card.