mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
17 lines
380 B
JavaScript
17 lines
380 B
JavaScript
const formatNearbyReq = (ctx, location) => {
|
|
const {profile, opt} = ctx;
|
|
|
|
return {
|
|
long: location.longitude,
|
|
lat: location.latitude,
|
|
radius: opt.distance || undefined,
|
|
products: profile.formatProductsFilter(ctx, opt.products || {}),
|
|
// TODO getPOIs: Boolean(opt.poi),
|
|
// TODO getStops: Boolean(opt.stops),
|
|
maxNo: opt.results,
|
|
};
|
|
};
|
|
|
|
export {
|
|
formatNearbyReq,
|
|
};
|