mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
popuplate booker when getting bookings
This commit is contained in:
committed by
Thomas Ruoff
parent
cd5fa56807
commit
c136b2d2e1
@@ -32,11 +32,11 @@ export async function getBookingByUUID(uuid: string) {
|
||||
|
||||
export async function getBookings() {
|
||||
await connect()
|
||||
const bookings = await Booking.find({
|
||||
return await Booking.find({
|
||||
status: { $in: [BOOKING_STATUS.REQUESTED, BOOKING_STATUS.CONFIRMED] },
|
||||
})
|
||||
// populate?
|
||||
return bookings
|
||||
.populate('booker')
|
||||
.exec()
|
||||
}
|
||||
|
||||
export async function createBooking({
|
||||
|
||||
Reference in New Issue
Block a user