diff --git a/docs/journeys.md b/docs/journeys.md index 7a9e9131..81b74e24 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -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', diff --git a/parse/stopover.js b/parse/stopover.js index 0264c321..763b27e8 100644 --- a/parse/stopover.js +++ b/parse/stopover.js @@ -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,