X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=61a4d962137ed2946a6755285420b32332a31245;hb=728e01f09f2b43946aab50eb2ed9673bf2d2daa3;hp=cc7177119093e12df8e64d613b0c01e09294950a;hpb=f911a4af34e676a49f542aec31cbef8075fb65ef;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index cc717711..61a4d962 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -164,16 +164,16 @@ export class ChargingStation { public logPrefix = (): string => { return Utils.logPrefix( ` ${ - (Utils.isNotEmptyString(this?.stationInfo?.chargingStationId) && - this?.stationInfo?.chargingStationId) ?? - ChargingStationUtils.getChargingStationId(this.index, this.getTemplateFromFile()) ?? - '' + (Utils.isNotEmptyString(this?.stationInfo?.chargingStationId) + ? this?.stationInfo?.chargingStationId + : ChargingStationUtils.getChargingStationId(this.index, this.getTemplateFromFile())) ?? + 'Error at building log prefix' } |` ); }; public hasIdTags(): boolean { - const idTagsFile = ChargingStationUtils.getAuthorizationFile(this.stationInfo); + const idTagsFile = ChargingStationUtils.getIdTagsFile(this.stationInfo); return Utils.isNotEmptyArray(this.idTagsCache.getIdTags(idTagsFile)); } @@ -866,18 +866,10 @@ export class ChargingStation { logger.error(`${this.logPrefix()} ${errorMsg}`); throw new BaseError(errorMsg); } - // Deprecation template keys section - ChargingStationUtils.warnDeprecatedTemplateKey( - stationTemplate, - 'supervisionUrl', + ChargingStationUtils.warnTemplateKeysDeprecation( this.templateFile, - this.logPrefix(), - "Use 'supervisionUrls' instead" - ); - ChargingStationUtils.convertDeprecatedTemplateKey( stationTemplate, - 'supervisionUrl', - 'supervisionUrls' + this.logPrefix() ); const stationInfo: ChargingStationInfo = ChargingStationUtils.stationTemplateToStationInfo(stationTemplate);