Reformat latlon -> coords

This commit is contained in:
Broks Randolfs Gailītis 2025-03-10 16:34:58 +02:00
parent 5a2c6d12a7
commit 3abf69edbd

View File

@ -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);