Adding query param to fetch schedulable reservations
This commit is contained in:
parent
1da322ed05
commit
9dc55e09cf
1 changed files with 7 additions and 1 deletions
|
|
@ -36,7 +36,13 @@ export class ReservationsController {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
getReservations(@Query('date') date?: Dayjs) {
|
getReservations(
|
||||||
|
@Query('date') date?: Dayjs,
|
||||||
|
@Query('schedulable') schedulable?: boolean,
|
||||||
|
) {
|
||||||
|
if (schedulable) {
|
||||||
|
return this.reservationsService.getScheduleable()
|
||||||
|
}
|
||||||
if (date) {
|
if (date) {
|
||||||
return this.reservationsService.getByDate(date)
|
return this.reservationsService.getByDate(date)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue