mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
extract patch booking to db
This commit is contained in:
committed by
Thomas Ruoff
parent
ef7f80fd92
commit
d9cd2af314
12
db/index.ts
12
db/index.ts
@@ -76,6 +76,18 @@ export async function createBooking({
|
||||
return booking.toJSON()
|
||||
}
|
||||
|
||||
export async function patchBooking(
|
||||
bookingUUID: string,
|
||||
bookingData: Booking,
|
||||
): Promise<Booking> {
|
||||
await connect()
|
||||
const booking = await getBookingByUUID(bookingUUID)
|
||||
booking.set(bookingData);
|
||||
await booking.save()
|
||||
|
||||
return booking.toJSON()
|
||||
}
|
||||
|
||||
export async function createBill(
|
||||
bookingUUID: string,
|
||||
billData: Bill
|
||||
|
||||
Reference in New Issue
Block a user