refactor: move to bun #19

Closed
philipp wants to merge 29 commits from bun into dev
11 changed files with 26 additions and 19 deletions
Showing only changes of commit b496950a48 - Show all commits

View File

@ -7,3 +7,5 @@ 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"

View File

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

View File

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

View File

@ -1 +1 @@
Lauf für Kaya! Passwort Reset
Lauf für Kaya! - Passwort Reset

View File

@ -1 +1 @@
Lauf für Kaya! Password Reset
Lauf für Kaya! - Password Reset

View File

@ -66,7 +66,7 @@
"
id="__react-email-preview"
>
Willkommen beim Lauf für Kaya! 2025 🏃‍♂️🌏
Willkommen beim {{event_name}} 🏃‍♂️🌏
<div>
                                                                                                           
</div>
@ -130,7 +130,7 @@
font-weight: 700;
"
>
<strong>Willkommen beim Lauf für Kaya! 2025</strong>
<strong>Willkommen beim {{event_name}}</strong>
</h2>
<p
style="
@ -160,7 +160,7 @@
-moz-osx-font-smoothing: grayscale;
"
>
vielen Dank für deine Registrierung beim Lauf für Kaya! 2025
vielen Dank für deine Registrierung beim {{event_name}}
</p>
<p
style="
@ -175,7 +175,7 @@
-moz-osx-font-smoothing: grayscale;
"
>
Am Lauftag (<strong>23.05.2025</strong>) musst du nur noch diesen
Am Lauftag (<strong>{{event_date}}</strong>) musst du nur noch diesen
Barcode vorzeigen, damit erhältst du deine Läuferkarte.
</p>
<table

View File

@ -1 +1 @@
Willkommen beim Lauf für Kaya! 2025
Willkommen beim {{event_name}}

View File

@ -1,8 +1,8 @@
Hallo {{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 deinen Barcode vorzeigen, damit erhältst du deine Läuferkarte.
Am Lauftag ({{event_date}}) musst du nur noch deinen Barcode vorzeigen, damit erhältst du deine Läuferkarte.
Deinen Registrierungs-Code, Rundenzeiten und weitere Infos kannst du jederzeit im Lauf für Kaya! Selfservice unter {{link}} einsehen.
Wir freuen uns schon auf dich und einen erfolgreichen Lauf für Kaya!

View File

@ -66,7 +66,7 @@
"
id="__react-email-preview"
>
Welcome to Lauf für Kaya! 2025 🏃‍♂️🌏
Welcome to {{event_name}} 🏃‍♂️🌏
<div>
                                                                                                           
</div>
@ -130,7 +130,7 @@
font-weight: 700;
"
>
<strong>Welcome to Lauf für Kaya! 2025</strong>
<strong>Welcome to {{event_name}}</strong>
</h2>
<p
style="
@ -160,7 +160,7 @@
-moz-osx-font-smoothing: grayscale;
"
>
Thank you for registering for the Lauf für Kaya! 2025
Thank you for registering for the {{event_name}}
</p>
<p
style="
@ -175,7 +175,7 @@
-moz-osx-font-smoothing: grayscale;
"
>
On the day of the run (<strong>23.05.2025</strong>) you only have to show your barcode to receive your runner's card.
On the day of the run (<strong>{{event_date}}</strong>) you only have to show your barcode to receive your runner's card.
</p>
<table
align="center"

View File

@ -1 +1 @@
Welcome to Lauf für Kaya! 2025
Welcome to {{event_name}}

View File

@ -1,8 +1,8 @@
Hello {{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.
You can view your registration code, lap times and further information at any time from the Lauf für Kaya! Selfservice at {{link}}.
We look forward to seeing you and to a successful Lauf für Kaya!