refactor: Move API-Endpoint-Functions to /api/talas_v5_DB/ folder for better organization

This commit is contained in:
ISA
2024-06-14 14:06:32 +02:00
parent c8ac4ebdb7
commit d220d0baae
18 changed files with 117 additions and 96 deletions

View File

@@ -18,7 +18,7 @@ export default function Home() {
const loadData = async () => {
try {
const response = await fetch("/api/readLocations");
const response = await fetch("/api/talas_v5_DB/pois/readLocations");
if (!response.ok) {
throw new Error("Fehler beim Laden der Standortdaten");
}
@@ -47,7 +47,7 @@ export default function Home() {
const handleAddLocation = async (name, type, lat, lng) => {
try {
const response = await fetch("/api/addLocation", {
const response = await fetch("/api/talas_v5_DB/pois/addLocation", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name, type, latitude: lat, longitude: lng }),