Skip to content

Commit

Permalink
Merge pull request #2138 from HSLdevcom/lij-hfp-trains
Browse files Browse the repository at this point in the history
Fix HFP trains
  • Loading branch information
vesameskanen authored Feb 1, 2018
2 parents f60312c + c0068da commit 3393706
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/action/realTimeClientAction.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import moment from 'moment';

const modeTranslate = {
train: 'rail',
};

// getTopic
// Returns MQTT topic to be subscribed
// Input: options - route, direction, tripStartTime are used to generate the topic
Expand Down Expand Up @@ -50,7 +54,7 @@ function parseMessage(topic, message, actionContext) {
parsedMessage.oday && parsedMessage.oday !== 'XXX'
? parsedMessage.oday
: moment().format('YYYYMMDD'),
mode,
mode: modeTranslate[mode] ? modeTranslate[mode] : mode,
delay: parsedMessage.dl,
next_stop: nextStop,
stop_index: parsedMessage.stop_index,
Expand Down

0 comments on commit 3393706

Please sign in to comment.