mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-06-07 21:02:33 +03:00
allow value -1 for transfers option in journeys() for db and dbnav profiles
This commit is contained in:
parent
9e69594a36
commit
7147c51b28
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ const formatJourneysReq = (ctx, from, to, when, outFrwd, journeysRef) => {
|
||||||
// TODO opt.accessibility
|
// TODO opt.accessibility
|
||||||
// TODO routingMode
|
// TODO routingMode
|
||||||
let query = {
|
let query = {
|
||||||
maxUmstiege: opt.transfers,
|
maxUmstiege: opt.transfers === -1 ? undefined : opt.transfers, // setting `maxUmstiege` to -1 is not allowed, see https://github.com/public-transport/db-vendo-client/issues/5
|
||||||
minUmstiegszeit: opt.transferTime,
|
minUmstiegszeit: opt.transferTime,
|
||||||
deutschlandTicketVorhanden: false,
|
deutschlandTicketVorhanden: false,
|
||||||
nurDeutschlandTicketVerbindungen: false,
|
nurDeutschlandTicketVerbindungen: false,
|
||||||
|
|
|
@ -46,7 +46,7 @@ const formatJourneysReq = (ctx, from, to, when, outFrwd, journeysRef) => {
|
||||||
? [{locationId: profile.formatLocation(profile, opt.via, 'opt.via').lid}]
|
? [{locationId: profile.formatLocation(profile, opt.via, 'opt.via').lid}]
|
||||||
: undefined,
|
: undefined,
|
||||||
zielLocationId: to.lid,
|
zielLocationId: to.lid,
|
||||||
maxUmstiege: opt.transfers || undefined,
|
maxUmstiege: opt.transfers === -1 ? undefined : opt.transfers, // setting `maxUmstiege` to -1 is not allowed, see https://github.com/public-transport/db-vendo-client/issues/5
|
||||||
minUmstiegsdauer: opt.transferTime || undefined,
|
minUmstiegsdauer: opt.transferTime || undefined,
|
||||||
fahrradmitnahme: opt.bike,
|
fahrradmitnahme: opt.bike,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue