mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
Saarfahrplan: filter empty radar() stopovers
This commit is contained in:
parent
e50c1694d8
commit
f0bd8ba61d
1 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,17 @@ const transformReqBody = (body) => {
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const createParseMovement = (profile, opt, data) => {
|
||||||
|
const _parseMovement = _createParseMovement(profile, opt, data)
|
||||||
|
const parseMovement = (m) => {
|
||||||
|
const res = _parseMovement(m)
|
||||||
|
// filter out empty stopovers
|
||||||
|
res.nextStops = res.nextStops.filter(st => !!st.stop)
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
return parseMovement
|
||||||
|
}
|
||||||
|
|
||||||
const saarfahrplanProfile = {
|
const saarfahrplanProfile = {
|
||||||
locale: 'de-DE',
|
locale: 'de-DE',
|
||||||
timezone: 'Europe/Berlin',
|
timezone: 'Europe/Berlin',
|
||||||
|
@ -30,6 +41,8 @@ const saarfahrplanProfile = {
|
||||||
|
|
||||||
products: products,
|
products: products,
|
||||||
|
|
||||||
|
parseMovement: createParseMovement,
|
||||||
|
|
||||||
departuresGetPasslist: false,
|
departuresGetPasslist: false,
|
||||||
departuresStbFltrEquiv: false,
|
departuresStbFltrEquiv: false,
|
||||||
trip: true,
|
trip: true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue