Implement global search

This commit is contained in:
2024-10-11 12:59:21 +02:00
parent 461bc753e6
commit 8e7c9a949d
24 changed files with 262 additions and 209 deletions

View File

@@ -7,11 +7,15 @@ export async function getAllLocations() {
}
export async function getLocation(locationName: string) {
return await axios.get(BASE_URL + "/" + locationName)
return await axios.get(BASE_URL + "/location/" + locationName)
}
export async function getTopLocations(nrOfLocations: number) {
let url = BASE_URL + "?sort=desc&count=" + nrOfLocations
return await axios.get(url)
}
export async function searchLocation(searchTerm: string) {
return await axios.get(BASE_URL + "/search?value=" + searchTerm)
}