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() {
|
async sendBootstrappedNotification() {
|
||||||
const version =
|
const version =
|
||||||
this.configService.get<string>('GIT_COMMIT') ??
|
this.configService.get<string>('GIT_COMMIT') ??
|
||||||
(this.configService.get('LOCAL') === 'true'
|
(this.configService.get('LOCAL') === 'true' ? 'LOCAL' : 'unknown')
|
||||||
? 'LOCAL'
|
|
||||||
: 'unknown')
|
|
||||||
await this.publishQueue.add(
|
await this.publishQueue.add(
|
||||||
...NtfyProvider.defaultJob({
|
...NtfyProvider.defaultJob({
|
||||||
title: 'Autobaan up and running',
|
title: 'Autobaan up and running',
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,14 @@ export class ReservationsService {
|
||||||
const reservation = await this.getById(id)
|
const reservation = await this.getById(id)
|
||||||
if (!reservation) return
|
if (!reservation) return
|
||||||
|
|
||||||
if (reservation.status === ReservationStatus.Booked)
|
try {
|
||||||
|
if (reservation.status === ReservationStatus.Booked) {
|
||||||
await this.brService.cancelReservation(reservation)
|
await this.brService.cancelReservation(reservation)
|
||||||
else if (reservation.status === ReservationStatus.OnWaitingList)
|
} else if (reservation.status === ReservationStatus.OnWaitingList) {
|
||||||
await this.brService.removeReservationFromWaitList(reservation)
|
await this.brService.removeReservationFromWaitList(reservation)
|
||||||
|
}
|
||||||
|
} catch (error: unknown) {}
|
||||||
|
|
||||||
return await this.reservationsRepository.delete({ id: reservation.id })
|
return await this.reservationsRepository.delete({ id: reservation.id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue