adds list search

This commit is contained in:
Christian Beutel
2025-01-26 17:28:38 +01:00
parent eda94f3003
commit f34fd7afed
20 changed files with 413 additions and 98 deletions

View File

@@ -1,17 +0,0 @@
import { env } from "$env/dynamic/private";
import { error, json, type RequestEvent } from "@sveltejs/kit";
export async function POST(event: RequestEvent) {
const data = await event.request.json()
try {
const r = await event.fetch(`${env.NOMINATIM_URL}/search?q=${data.q}&format=geocodejson&limit=${data.limit}`)
return json(r);
} catch (e: any) {
console.log(e);
throw error(e.httpStatus, e)
}
}