From 3abf69edbdd7a2a60804fb6d1925fab8e0155de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Broks=20Randolfs=20Gail=C4=ABtis?= Date: Mon, 10 Mar 2025 16:34:58 +0200 Subject: [PATCH] Reformat latlon -> coords --- apps/blakus-api/src/app/routes/blakus.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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);