From 96d96b12d0fd34e04b09e6262bb2d385a15b220f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 5 Jun 2023 21:18:33 +0200 Subject: [PATCH] refactor: cleanup reservation code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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: -- 2.34.1