Skip to content

Commit

Permalink
Update hafas-client to 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KristjanESPERANTO committed Dec 17, 2022
1 parent a3f81c3 commit b279a62
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
18 changes: 9 additions & 9 deletions core/HafasFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ module.exports = class HafasFetcher {
constructor(config) {
this.leadTime = 20; // minutes
this.config = config;

// Possible transportation types given by profil
this.possibleTransportationTypes = profile.products.map((s) => s.id);

// Remove the excluded types from the possible types
this.config.includedTransportationTypes = getArrayDiff(
this.possibleTransportationTypes,
this.config.excludedTransportationTypes
);
}

async init() {
Expand All @@ -48,15 +57,6 @@ module.exports = class HafasFetcher {
profile,
`MMM-PublicTransportHafas v${pjson.version}`
);

// Possible transportation types given by profil
this.possibleTransportationTypes = profile.products.map((s) => s.id);

// Remove the excluded types from the possible types
this.config.includedTransportationTypes = getArrayDiff(
this.possibleTransportationTypes,
this.config.excludedTransportationTypes
);
}

getIdentifier() {
Expand Down
32 changes: 15 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b279a62

Please sign in to comment.