README.md: Refine list of OCPP versions
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20IncomingRequestService.ts
index 9d352181629e30cb3a59614cf5b4f8dc4e391bb1..96a66f1ad01d39b9fa8c72d161f0c3ed2c23c6b6 100644 (file)
@@ -16,10 +16,10 @@ import type { OCPP20ClearCacheResponse } from '../../../types/ocpp/2.0/Responses
 import { ErrorType } from '../../../types/ocpp/ErrorType';
 import { OCPPVersion } from '../../../types/ocpp/OCPPVersion';
 import type { IncomingRequestHandler } from '../../../types/ocpp/Requests';
-import Constants from '../../../utils/Constants';
 import logger from '../../../utils/Logger';
 import type ChargingStation from '../../ChargingStation';
 import { ChargingStationUtils } from '../../ChargingStationUtils';
+import OCPPConstants from '../OCPPConstants';
 import OCPPIncomingRequestService from '../OCPPIncomingRequestService';
 import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
 
@@ -141,7 +141,7 @@ export default class OCPP20IncomingRequestService extends OCPPIncomingRequestSer
     commandName: OCPP20IncomingRequestCommand,
     commandPayload: JsonType
   ): boolean {
-    if (this.jsonSchemas.has(commandName)) {
+    if (this.jsonSchemas.has(commandName) === true) {
       return this.validateIncomingRequestPayload(
         chargingStation,
         commandName,
@@ -159,6 +159,6 @@ export default class OCPP20IncomingRequestService extends OCPPIncomingRequestSer
     chargingStation.authorizedTagsCache.deleteAuthorizedTags(
       ChargingStationUtils.getAuthorizationFile(chargingStation.stationInfo)
     );
-    return Constants.OCPP_RESPONSE_ACCEPTED;
+    return OCPPConstants.OCPP_RESPONSE_ACCEPTED;
   }
 }