db-vendo-client/format/locations-req.js

21 lines
383 B
JavaScript
Raw Permalink Normal View History

2019-10-31 20:08:56 +01:00
const formatLocationsReq = (ctx, query) => {
const {profile, opt} = ctx
return {
cfg: {polyEnc: 'GPA'},
meth: 'LocMatch',
req: {input: {
loc: {
type: profile.formatLocationFilter(opt.stops, opt.addresses, opt.poi),
name: opt.fuzzy ? query + '?' : query
},
maxLoc: opt.results,
field: 'S' // todo: what is this?
}}
}
}
2022-05-07 16:17:37 +02:00
export {
formatLocationsReq,
}