db-vendo-client/format/reachable-from-req.js
Kristjan ESPERANTO 66d9fb5194
apply linting rules
follow-up of 228c7253
2024-02-10 16:50:12 +01:00

24 lines
546 B
JavaScript

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 || {}),
],
},
};
};
export {
formatReachableFromReq,
};