From: Jérôme Benoit Date: Mon, 5 Jun 2023 19:18:33 +0000 (+0200) Subject: refactor: cleanup reservation code X-Git-Tag: v1.2.16~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=96d96b12d0fd34e04b09e6262bb2d385a15b220f;p=e-mobility-charging-stations-simulator.git refactor: cleanup reservation code Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 0101e26e..85623e28 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -951,10 +951,9 @@ export class ChargingStation { ): Promise { const connector = this.getConnectorStatus(reservation.connectorId); switch (reason) { - case ReservationTerminationReason.CONNECTOR_STATE_CHANGED: { + case ReservationTerminationReason.CONNECTOR_STATE_CHANGED: delete connector.reservation; break; - } case ReservationTerminationReason.TRANSACTION_STARTED: case ReservationTerminationReason.EXPIRED: case ReservationTerminationReason.RESERVATION_CANCELED: