refactor: cleanup reservation code
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 5 Jun 2023 19:18:33 +0000 (21:18 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 5 Jun 2023 19:18:33 +0000 (21:18 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 0101e26e11fd6f355189ea73e15a6d59a5287ee0..85623e28596bf36796e0acefda364e7800c93c3f 100644 (file)
@@ -951,10 +951,9 @@ export class ChargingStation {
   ): Promise<void> {
     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: