From: Jérôme Benoit Date: Tue, 7 Nov 2023 19:17:37 +0000 (+0100) Subject: refactor(simulator): use generic type in OCPP payload validation code X-Git-Tag: v1.2.24~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=eba56146807fea49f821d3b0b46a679b0b0af29a;p=e-mobility-charging-stations-simulator.git refactor(simulator): use generic type in OCPP payload validation code Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPResponseService.ts b/src/charging-station/ocpp/OCPPResponseService.ts index 90f92169..b76fde6a 100644 --- a/src/charging-station/ocpp/OCPPResponseService.ts +++ b/src/charging-station/ocpp/OCPPResponseService.ts @@ -72,10 +72,7 @@ export abstract class OCPPResponseService { return true; } if (this.jsonRequestValidateFunctions.has(commandName) === false) { - this.jsonRequestValidateFunctions.set( - commandName, - this.ajv.compile(schema).bind(this), - ); + this.jsonRequestValidateFunctions.set(commandName, this.ajv.compile(schema).bind(this)); } const validate = this.jsonRequestValidateFunctions.get(commandName)!; if (validate(payload)) {