fix: double slash in photon requests
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user