Adding debug log to creation of reservation

This commit is contained in:
Collin Duncan 2023-06-28 09:41:24 +02:00
parent e0671749bd
commit a4076796af
No known key found for this signature in database

View file

@ -58,9 +58,11 @@ export class ReservationsController {
)
async createReservation(@Body() reservation: Reservation) {
if (!reservation.isAvailableForReservation()) {
this.loggerService.debug('Reservation not available for reservation')
await this.reservationsService.create(reservation)
return 'Reservation saved'
}
this.loggerService.debug('Reservation is available for reservation')
await this.reservationsQueue.add(reservation)
return 'Reservation queued'
}