stopover.type, stopover.station -> stopover.stop 💥

To be compatible with `friendly-public-transport-format@1.1.1`.
This commit is contained in:
Jannis R 2018-06-25 11:33:26 +02:00
parent 96f9f93957
commit 3e672eeabd
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 5 additions and 4 deletions

View file

@ -160,7 +160,7 @@ The response may look like this:
},
direction: 'S Potsdam Hauptbahnhof',
stopovers: [ {
station: {
stop: {
type: 'station',
id: '900000003201',
name: 'S+U Berlin Hauptbahnhof',
@ -171,7 +171,7 @@ The response may look like this:
departure: null,
cancelled: true
}, {
station: {
stop: {
type: 'station',
id: '900000003102',
name: 'S Bellevue',
@ -181,7 +181,7 @@ The response may look like this:
arrival: '2017-12-17T19:09:00.000+01:00',
departure: '2017-12-17T19:09:00.000+01:00'
}, /* … */ {
station: {
stop: {
type: 'station',
id: '900000024101',
name: 'S Charlottenburg',

View file

@ -3,7 +3,8 @@
const createParseStopover = (profile, stations, lines, remarks, date) => {
const parseStopover = (st) => {
const res = {
station: stations[parseInt(st.locX)] || null,
type: 'stopover',
stop: stations[parseInt(st.locX)] || null,
arrival: null,
arrivalDelay: null,
arrivalPlatform: st.aPlatfR || st.aPlatfS || null,