More skelton loader, add optional parameters to /locations and /events

This commit is contained in:
2024-10-04 15:20:40 +02:00
parent e2f6fb9c52
commit bfffd72a4a
16 changed files with 106 additions and 48 deletions

View File

@@ -7,5 +7,11 @@ export async function fetchEvents(city: string = "", genre: string = "") {
url += (city.length > 0) ? "city=" + city + "&" : ""
url += (genre.length > 0) ? "genre=" + genre : ""
return await axios.get(url)
}
export async function getTopEvents(nrOfEvents) {
let url = BASE_URL + "?sort=desc&count=" + nrOfEvents
return await axios.get(url)
}