profile-based whitelist for walkingSpeed

This commit is contained in:
Jannis R 2018-10-30 00:47:40 +01:00
parent 0c145d352b
commit 9a89cd0dc8
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 9 additions and 5 deletions

View file

@ -182,11 +182,14 @@ const createClient = (profile, userAgent, request = _request) => {
if (!['slow','normal','fast'].includes(opt.walkingSpeed)) {
throw new Error('opt.walkingSpeed must be one of these values: "slow", "normal", "fast".')
}
const gisFltrL = [{
const gisFltrL = []
if (profile.journeysWalkingSpeed) {
gisFltrL.push({
meta: 'foot_speed_' + opt.walkingSpeed,
mode: 'FB',
type: 'M'
}]
})
}
// With protocol version `1.16`, the VBB endpoint *used to* fail with
// `CGI_READ_FAILED` if you pass `numF`, the parameter for the number

View file

@ -142,6 +142,7 @@ const vbbProfile = {
formatStation,
journeysNumF: true,
journeysWalkingSpeed: true,
trip: true,
radar: true,
reachableFrom: true