mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
let parseStopover use parseStationName 🐛
This commit is contained in:
parent
6ba617b1bc
commit
787b00228e
2 changed files with 1 additions and 17 deletions
|
@ -9,7 +9,6 @@ const getStations = require('vbb-stations')
|
|||
const _createParseLine = require('../../parse/line')
|
||||
const _parseLocation = require('../../parse/location')
|
||||
const _createParseJourney = require('../../parse/journey')
|
||||
const _createParseStopover = require('../../parse/stopover')
|
||||
const _createParseDeparture = require('../../parse/departure')
|
||||
const _formatStation = require('../../format/station')
|
||||
const createParseBitmask = require('../../parse/products-bitmask')
|
||||
|
@ -99,20 +98,6 @@ const createParseJourney = (profile, stations, lines, remarks) => {
|
|||
return parseJourneyWithTickets
|
||||
}
|
||||
|
||||
const createParseStopover = (profile, stations, lines, remarks, date) => {
|
||||
const parseStopover = _createParseStopover(profile, stations, lines, remarks, date)
|
||||
|
||||
const parseStopoverWithShorten = (st) => {
|
||||
const res = parseStopover(st)
|
||||
if (res.station && res.station.name) {
|
||||
res.station.name = shorten(res.station.name)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
return parseStopoverWithShorten
|
||||
}
|
||||
|
||||
const createParseDeparture = (profile, stations, lines, remarks) => {
|
||||
const parseDeparture = _createParseDeparture(profile, stations, lines, remarks)
|
||||
|
||||
|
@ -184,7 +169,6 @@ const vbbProfile = {
|
|||
parseProducts: createParseBitmask(modes.allProducts, defaultProducts),
|
||||
parseJourney: createParseJourney,
|
||||
parseDeparture: createParseDeparture,
|
||||
parseStopover: createParseStopover,
|
||||
|
||||
formatStation,
|
||||
formatProducts,
|
||||
|
|
|
@ -19,7 +19,7 @@ const parseLocation = (profile, l, lines) => {
|
|||
const station = {
|
||||
type: 'station',
|
||||
id: l.extId,
|
||||
name: l.name,
|
||||
name: profile.parseStationName(l.name),
|
||||
location: 'number' === typeof res.latitude ? res : null
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue