From 49bc4b806d6320bfb011d3a2c7fee843fb5f7e9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 27 Aug 2022 00:23:47 +0200 Subject: [PATCH] UI server: comment and code cleanups 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 | 2 +- .../ui-server/ui-services/AbstractUIService.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/charging-station/ui-server/UIHttpServer.ts b/src/charging-station/ui-server/UIHttpServer.ts index 98a1a495..0731b3c0 100644 --- a/src/charging-station/ui-server/UIHttpServer.ts +++ b/src/charging-station/ui-server/UIHttpServer.ts @@ -59,7 +59,7 @@ export default class UIHttpServer extends AbstractUIServer { break; } if (this.responseHandlers.has(uuid)) { - const { procedureName, res } = this.responseHandlers.get(uuid); + const { res } = this.responseHandlers.get(uuid); res.writeHead(statusCode, { 'Content-Type': 'application/json' }); res.write(JSON.stringify(payload)); res.end(); diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index e27577d3..24307992 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -103,8 +103,7 @@ export default abstract class AbstractUIService { return JSON.stringify([messageId, responsePayload] as ProtocolResponse); } - // Validate the raw data received from the WebSocket - // TODO: should probably be moved to the ws verify clients callback + // Validate the raw data received from the UI server private requestValidation(rawData: RawData | JsonType): ProtocolRequest { // logger.debug( // `${this.logPrefix( -- 2.34.1