repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix CI jobs run on windows
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ChargingStationUtils.ts
diff --git
a/src/charging-station/ChargingStationUtils.ts
b/src/charging-station/ChargingStationUtils.ts
index c63a7f27e67411558c7f6f42b3be66859e2fecfa..9eee346630083ee75dc623af9b16c6ff14704d0f 100644
(file)
--- a/
src/charging-station/ChargingStationUtils.ts
+++ b/
src/charging-station/ChargingStationUtils.ts
@@
-235,20
+235,11
@@
export class ChargingStationUtils {
}
public static createStationInfoHash(stationInfo: ChargingStationInfo): void {
}
public static createStationInfoHash(stationInfo: ChargingStationInfo): void {
- const previousInfoHash = stationInfo?.infoHash ?? '';
delete stationInfo.infoHash;
delete stationInfo.infoHash;
-
const currentI
nfoHash = crypto
+
stationInfo.i
nfoHash = crypto
.createHash(Constants.DEFAULT_HASH_ALGORITHM)
.update(JSON.stringify(stationInfo))
.digest('hex');
.createHash(Constants.DEFAULT_HASH_ALGORITHM)
.update(JSON.stringify(stationInfo))
.digest('hex');
- if (
- Utils.isEmptyString(previousInfoHash) ||
- (!Utils.isEmptyString(previousInfoHash) && currentInfoHash !== previousInfoHash)
- ) {
- stationInfo.infoHash = currentInfoHash;
- } else {
- stationInfo.infoHash = previousInfoHash;
- }
}
public static createSerialNumber(
}
public static createSerialNumber(