diff --git a/apps/blakus-api/src/app/routes/blakus.ts b/apps/blakus-api/src/app/routes/blakus.ts index fa699d3..2a6bcf3 100644 --- a/apps/blakus-api/src/app/routes/blakus.ts +++ b/apps/blakus-api/src/app/routes/blakus.ts @@ -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);