From: Jérôme Benoit Date: Fri, 9 Feb 2024 14:56:04 +0000 (+0100) Subject: refactor: cleanup variables namespace X-Git-Tag: v1.2.36~25 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3000c1258ccda0c8828f4e4fffb988e5ffaa84da;p=e-mobility-charging-stations-simulator.git refactor: cleanup variables namespace Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ui-server/UIHttpServer.ts b/src/charging-station/ui-server/UIHttpServer.ts index b10d3336..eafea59a 100644 --- a/src/charging-station/ui-server/UIHttpServer.ts +++ b/src/charging-station/ui-server/UIHttpServer.ts @@ -126,9 +126,9 @@ export class UIHttpServer extends AbstractUIServer { bodyBuffer.push(chunk) }) .on('end', () => { - let body: RequestPayload | undefined + let requestPayload: RequestPayload | undefined try { - body = JSON.parse(Buffer.concat(bodyBuffer).toString()) as RequestPayload + requestPayload = JSON.parse(Buffer.concat(bodyBuffer).toString()) as RequestPayload } catch (error) { this.sendResponse( this.buildProtocolResponse(uuid, { @@ -141,7 +141,7 @@ export class UIHttpServer extends AbstractUIServer { } this.uiServices .get(version) - ?.requestHandler(this.buildProtocolRequest(uuid, procedureName, body)) + ?.requestHandler(this.buildProtocolRequest(uuid, procedureName, requestPayload)) .then((protocolResponse?: ProtocolResponse) => { if (protocolResponse != null) { this.sendResponse(protocolResponse)