mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
add email to customer as well
This commit is contained in:
@@ -2,7 +2,7 @@ import { Error } from 'mongoose'
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import { BookingDocument } from '../../../db/booking'
|
||||
import { createBooking } from '../../../db/index'
|
||||
import { sendReceivedBookingMail } from '../../../helpers/mail'
|
||||
import { sendReceivedBookingAdminMail, sendReceivedBookingBookerMail } from '../../../helpers/mail'
|
||||
|
||||
export default async function userHandler(
|
||||
req: NextApiRequest,
|
||||
@@ -27,8 +27,9 @@ export default async function userHandler(
|
||||
return
|
||||
}
|
||||
|
||||
await sendReceivedBookingMail(booking)
|
||||
console.log('sent receivedBookingMail')
|
||||
console.log(`received booking ${booking.uuid}`)
|
||||
await sendReceivedBookingAdminMail(booking)
|
||||
await sendReceivedBookingBookerMail(booking)
|
||||
break
|
||||
default:
|
||||
res.setHeader('Allow', ['POST'])
|
||||
|
||||
Reference in New Issue
Block a user