Changing how retrieving schedulable reservations works

This commit is contained in:
Collin Duncan 2023-09-20 09:37:57 +02:00
parent c2bb21d55a
commit d9ed2f22c1
No known key found for this signature in database

View file

@ -45,11 +45,12 @@ export class ReservationsService {
.where(
`DATE(dateRangeStart) BETWEEN DATE(:startDate) AND DATE(:endDate)`,
{
startDate: dayjs().add(7, 'days').toISOString(),
endDate: dayjs().toISOString(),
startDate: dayjs().add(1, 'days').toISOString(),
endDate: dayjs().add(7, 'days').toISOString(),
},
)
.andWhere(`waitListed = false`)
.orderBy('dateRangeStart', 'DESC')
return await query.getMany()
}