From d52d967d1c27d68540af46105703a584c9f1c458 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 9 Sep 2021 10:39:07 +0200 Subject: [PATCH] fix fetch bookings --- db/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/index.ts b/db/index.ts index d7e9ec1..55fa360 100644 --- a/db/index.ts +++ b/db/index.ts @@ -41,7 +41,7 @@ export async function getBookings({ return await BookingModel.find({ status: { $in: status }, startDate: { $gte: startDateGreaterThan }, - }, { sort: { startDate: -1 } }).exec() + }).sort({ startDate: -1 }).exec() } export async function createBooking({