From: Jérôme Benoit Date: Tue, 28 Sep 2021 21:28:09 +0000 (+0200) Subject: Revert promise resolve/reject value X-Git-Tag: v1.1.16~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=aba5361d9e42555ef62e31101a738cdab1c77e33;p=e-mobility-charging-stations-simulator.git Revert promise resolve/reject value Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 1bc8e70c..a8567b4d 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -56,7 +56,7 @@ export default abstract class OCPPRequestService { // Response? if (messageType !== MessageType.CALL_MESSAGE) { // Yes: send Ok - resolve({ commandName, commandParams }); + resolve(commandParams); } else { // Send timeout setTimeout(() => rejectCallback(new OCPPError(ErrorType.GENERIC_ERROR, `Timeout for message id '${messageId}' with content '${messageToSend}'`, commandParams?.details ?? {})), Constants.OCPP_SOCKET_TIMEOUT); @@ -75,7 +75,7 @@ export default abstract class OCPPRequestService { // Send the response await self.ocppResponseService.handleResponse(commandName as RequestCommand, payload, requestPayload); self.chargingStation.requests.delete(messageId); - resolve({ commandName, payload, requestPayload }); + resolve(payload); } /**