fix: double slash in photon requests

This commit is contained in:
2025-09-16 18:18:59 +02:00
parent e45fd8092a
commit 222216f172

View File

@ -28,14 +28,14 @@ export async function searchPlaces(
lon: number, lon: number,
): Promise<Feature[]> { ): Promise<Feature[]> {
const res = await fetch( const res = await fetch(
SEARCH_SERVER + "/api/?q=" + query + "&lat=" + lat + "&lon=" + lon, SEARCH_SERVER + "api/?q=" + query + "&lat=" + lat + "&lon=" + lon,
).then((res) => res.json()); ).then((res) => res.json());
return res.features; return res.features;
} }
export async function reverseGeocode(coord: WorldLocation): Promise<Feature[]> { export async function reverseGeocode(coord: WorldLocation): Promise<Feature[]> {
const res = await fetch( const res = await fetch(
SEARCH_SERVER + "/reverse?lat=" + coord.lat + "&lon=" + coord.lon, SEARCH_SERVER + "reverse?lat=" + coord.lat + "&lon=" + coord.lon,
).then((res) => res.json()); ).then((res) => res.json());
return res.features; return res.features;
} }