Compare commits
2 commits
9f043738b4
...
047845155e
| Author | SHA1 | Date | |
|---|---|---|---|
| 047845155e | |||
| 9059f0071f |
2 changed files with 9 additions and 7 deletions
|
|
@ -62,9 +62,7 @@ export class NtfyProvider implements OnApplicationBootstrap {
|
|||
async sendBootstrappedNotification() {
|
||||
const version =
|
||||
this.configService.get<string>('GIT_COMMIT') ??
|
||||
(this.configService.get('LOCAL') === 'true'
|
||||
? 'LOCAL'
|
||||
: 'unknown')
|
||||
(this.configService.get('LOCAL') === 'true' ? 'LOCAL' : 'unknown')
|
||||
await this.publishQueue.add(
|
||||
...NtfyProvider.defaultJob({
|
||||
title: 'Autobaan up and running',
|
||||
|
|
|
|||
|
|
@ -112,10 +112,14 @@ export class ReservationsService {
|
|||
const reservation = await this.getById(id)
|
||||
if (!reservation) return
|
||||
|
||||
if (reservation.status === ReservationStatus.Booked)
|
||||
await this.brService.cancelReservation(reservation)
|
||||
else if (reservation.status === ReservationStatus.OnWaitingList)
|
||||
await this.brService.removeReservationFromWaitList(reservation)
|
||||
try {
|
||||
if (reservation.status === ReservationStatus.Booked) {
|
||||
await this.brService.cancelReservation(reservation)
|
||||
} else if (reservation.status === ReservationStatus.OnWaitingList) {
|
||||
await this.brService.removeReservationFromWaitList(reservation)
|
||||
}
|
||||
} catch (error: unknown) {}
|
||||
|
||||
return await this.reservationsRepository.delete({ id: reservation.id })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue