From 3000c1258ccda0c8828f4e4fffb988e5ffaa84da Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 9 Feb 2024 15:56:04 +0100 Subject: [PATCH] refactor: cleanup variables namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ui-server/UIHttpServer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.34.1