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

22 lines
400 B
JavaScript

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?
}},
};
};
export {
formatLocationsReq,
};