From: Jérôme Benoit Date: Mon, 5 Jun 2023 19:14:57 +0000 (+0200) Subject: refactor: cleanup reservation code X-Git-Tag: v1.2.16~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b029e74e2da1c9181d29ec10e6e2f4c2375b8da9;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 24f94682..0101e26e 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -935,8 +935,7 @@ export class ChargingStation { if (exists) { await this.removeReservation(reservationFound); } - const connectorStatus = this.getConnectorStatus(reservation.connectorId); - connectorStatus.reservation = reservation; + this.getConnectorStatus(reservation.connectorId).reservation = reservation; await OCPPServiceUtils.sendAndSetConnectorStatus( this, reservation.connectorId, @@ -968,6 +967,8 @@ export class ChargingStation { ); delete connector.reservation; break; + default: + break; } }