From aba5361d9e42555ef62e31101a738cdab1c77e33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 28 Sep 2021 23:28:09 +0200 Subject: [PATCH] Revert promise resolve/reject value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/OCPPRequestService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } /** -- 2.34.1