mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix sending reject and confirmation mails
This commit is contained in:
@@ -84,13 +84,14 @@ export async function createBooking({
|
||||
export async function patchBooking(
|
||||
bookingUUID: string,
|
||||
bookingData: Booking
|
||||
): Promise<Booking> {
|
||||
): Promise<{ current: Booking; previous: Booking }> {
|
||||
await connect()
|
||||
const booking = await getBookingByUUID(bookingUUID)
|
||||
const oldBooking = booking.toJSON()
|
||||
booking.set(bookingData)
|
||||
await booking.save()
|
||||
|
||||
return booking.toJSON()
|
||||
return { current: booking.toJSON(), previous: oldBooking }
|
||||
}
|
||||
|
||||
export async function createBill(
|
||||
|
||||
Reference in New Issue
Block a user