mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
add patch for bookings and only allow status
This commit is contained in:
@@ -42,8 +42,12 @@ export async function getBookedDays() {
|
||||
export async function getBookingByUUID(uuid) {
|
||||
await connect()
|
||||
const booking = await Booking.findOne({ uuid })
|
||||
await booking.populate('booker').execPopulate()
|
||||
return booking
|
||||
return booking.populate('booker').execPopulate()
|
||||
}
|
||||
|
||||
export async function getBookingByUUIDAsJSON(uuid) {
|
||||
const booking = await getBookingByUUID(uuid)
|
||||
return booking.toJSON()
|
||||
}
|
||||
|
||||
export async function createBooking({
|
||||
|
||||
Reference in New Issue
Block a user