Adding query param to fetch schedulable reservations

This commit is contained in:
Collin Duncan 2023-09-12 09:47:23 +02:00
parent 1da322ed05
commit 9dc55e09cf
No known key found for this signature in database

View file

@ -36,7 +36,13 @@ export class ReservationsController {
) {}
@Get()
getReservations(@Query('date') date?: Dayjs) {
getReservations(
@Query('date') date?: Dayjs,
@Query('schedulable') schedulable?: boolean,
) {
if (schedulable) {
return this.reservationsService.getScheduleable()
}
if (date) {
return this.reservationsService.getByDate(date)
}