db-vendo-client/format/reachable-from-req.js

23 lines
531 B
JavaScript
Raw Normal View History

2019-10-31 20:08:56 +01:00
const formatReachableFromReq = (ctx, address) => {
const {profile, opt} = ctx
return {
meth: 'LocGeoReach',
req: {
loc: profile.formatLocation(profile, address, 'address'),
maxDur: opt.maxDuration === null ? -1 : opt.maxDuration,
maxChg: opt.maxTransfers,
date: profile.formatDate(profile, opt.when),
time: profile.formatTime(profile, opt.when),
period: 120, // todo: what is this?
jnyFltrL: [
profile.formatProductsFilter(ctx, opt.products || {})
]
}
}
}
2022-05-07 16:17:37 +02:00
export {
formatReachableFromReq,
}