Adding debug log to creation of reservation
This commit is contained in:
parent
e0671749bd
commit
a4076796af
1 changed files with 2 additions and 0 deletions
|
|
@ -58,9 +58,11 @@ export class ReservationsController {
|
||||||
)
|
)
|
||||||
async createReservation(@Body() reservation: Reservation) {
|
async createReservation(@Body() reservation: Reservation) {
|
||||||
if (!reservation.isAvailableForReservation()) {
|
if (!reservation.isAvailableForReservation()) {
|
||||||
|
this.loggerService.debug('Reservation not available for reservation')
|
||||||
await this.reservationsService.create(reservation)
|
await this.reservationsService.create(reservation)
|
||||||
return 'Reservation saved'
|
return 'Reservation saved'
|
||||||
}
|
}
|
||||||
|
this.loggerService.debug('Reservation is available for reservation')
|
||||||
await this.reservationsQueue.add(reservation)
|
await this.reservationsQueue.add(reservation)
|
||||||
return 'Reservation queued'
|
return 'Reservation queued'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue