New page for all concerts

This commit is contained in:
2024-10-12 19:40:12 +02:00
parent f8bdb54c33
commit 6c33de3d87
56 changed files with 531 additions and 405 deletions

View File

@@ -2,6 +2,10 @@ import axios from "axios"
let BASE_URL = "http://localhost:3000/concerts"
export async function fetchConcerts() {
return await axios.get(BASE_URL)
}
export async function getConcert(id: number) {
if (id != undefined) {
return await axios.get(BASE_URL + "/concert/" + id)
@@ -9,3 +13,7 @@ export async function getConcert(id: number) {
return null
}
}
export async function searchConcert(searchTerm: string) {
return await axios.get(BASE_URL + '/search?value=' + searchTerm)
}

View File

@@ -2,11 +2,12 @@ import axios from "axios"
const BASE_URL = "http://localhost:3000/locations"
export async function getAllLocations() {
export async function fetchAllLocations() {
return await axios.get(BASE_URL)
}
export async function getLocation(locationName: string) {
console.log(locationName)
return await axios.get(BASE_URL + "/location/" + locationName)
}