fix/bookings-order (#1920)

pull/1922/head
alannnc 2022-02-19 18:00:35 -07:00 committed by GitHub
parent 08e6059c8d
commit 6749b887dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -339,9 +339,9 @@ const loggedInViewerRouter = createProtectedRouter()
typeof bookingListingByStatus,
Prisma.BookingOrderByWithAggregationInput
> = {
upcoming: { startTime: "desc" },
upcoming: { startTime: "asc" },
past: { startTime: "desc" },
cancelled: { startTime: "desc" },
cancelled: { startTime: "asc" },
};
const passedBookingsFilter = bookingListingFilters[bookingListingByStatus];
const orderBy = bookingListingOrderby[bookingListingByStatus];
@ -390,7 +390,7 @@ const loggedInViewerRouter = createProtectedRouter()
skip,
});
const bookings = bookingsQuery.reverse().map((booking) => {
const bookings = bookingsQuery.map((booking) => {
return {
...booking,
startTime: booking.startTime.toISOString(),