mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
add link to new bookings email for admin
This commit is contained in:
@@ -30,6 +30,14 @@ async function sendMail(data) {
|
||||
}
|
||||
}
|
||||
|
||||
function getReceivedBookingText(booking) {
|
||||
return `Hallo lieber Admin,
|
||||
|
||||
es ging folgende Buchung ein: https://${process.env.VERCEL_URL}/booking/${booking.uuid}
|
||||
|
||||
MfG`
|
||||
}
|
||||
|
||||
export async function sendReceivedBookingMail(booking) {
|
||||
const data = {
|
||||
personalizations: [
|
||||
@@ -39,9 +47,7 @@ export async function sendReceivedBookingMail(booking) {
|
||||
],
|
||||
from: { email: FROM_EMAIL },
|
||||
subject: 'Pfadi Bussle - Buchung eingegangen!',
|
||||
content: [
|
||||
{ type: 'text/plain', value: `${JSON.stringify(booking, null, 4)}` },
|
||||
],
|
||||
content: [{ type: 'text/plain', value: getReceivedBookingText(booking) }],
|
||||
}
|
||||
|
||||
await sendMail(data)
|
||||
|
||||
Reference in New Issue
Block a user