Reformat latlon -> coords
This commit is contained in:
parent
5a2c6d12a7
commit
3abf69edbd
@ -17,6 +17,13 @@ export default async function (fastify: FastifyInstance) {
|
||||
properties: {
|
||||
title: { type: 'string' },
|
||||
amenity: { type: 'string' },
|
||||
coords: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
lat: { type: 'number' },
|
||||
lon: { type: 'number' }
|
||||
}
|
||||
},
|
||||
tags: { type: 'object', additionalProperties: true }
|
||||
}
|
||||
}
|
||||
@ -29,7 +36,7 @@ export default async function (fastify: FastifyInstance) {
|
||||
}, async function (request, reply) {
|
||||
const {lat, lon} = request.query;
|
||||
const elements = await overpassService.getAmenitiesAroundLocation({
|
||||
latlon: { lat, lon },
|
||||
coords: { lat, lon },
|
||||
amenities: ['restaurant', 'cafe', 'bar', 'pub', 'biergarten', 'fast_food', 'food_court', 'ice_cream']
|
||||
});
|
||||
reply.send(elements);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user