X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2Focpp%2FOCPPResponseService.ts;h=3f69655ec82dfaa573bb04b269e244c45c3a4102;hb=77b95a89411dcee5df14a283f05f6d6020db08ef;hp=3faa4351e7ef8867096c2844ef5d243110dcfb0d;hpb=6c1761d470507ea23d186be61b94ca7375c5144a;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPResponseService.ts b/src/charging-station/ocpp/OCPPResponseService.ts index 3faa4351..3f69655e 100644 --- a/src/charging-station/ocpp/OCPPResponseService.ts +++ b/src/charging-station/ocpp/OCPPResponseService.ts @@ -13,7 +13,7 @@ const moduleName = 'OCPPResponseService'; export default abstract class OCPPResponseService { private static instance: OCPPResponseService | null = null; - private ajv: Ajv; + private readonly ajv: Ajv; protected constructor() { this.ajv = new Ajv(); @@ -35,7 +35,7 @@ export default abstract class OCPPResponseService { schema: JSONSchemaType, payload: T ): boolean { - if (!chargingStation.getPayloadSchemaValidation()) { + if (chargingStation.getPayloadSchemaValidation() === false) { return true; } const validate = this.ajv.compile(schema); @@ -54,8 +54,9 @@ export default abstract class OCPPResponseService { ); } - // eslint-disable-next-line @typescript-eslint/no-empty-function - protected emptyResponseHandler() {} + protected emptyResponseHandler() { + /* This is intentional */ + } public abstract responseHandler( chargingStation: ChargingStation,