add: idLD in readLocations.js
API-Endpunktroute
This commit is contained in:
@@ -22,7 +22,7 @@ export default function handler(req, res) {
|
||||
console.log("Verbunden als ID", connection.threadId);
|
||||
|
||||
connection.query(
|
||||
"SELECT idPoi, description, idPoiTyp, ST_AsText(position) AS position FROM poi",
|
||||
"SELECT idPoi, description, idPoiTyp, idLD, ST_AsText(position) AS position FROM poi",
|
||||
(error, results) => {
|
||||
if (error) {
|
||||
console.error("Fehler beim Abrufen der API", error);
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function Home() {
|
||||
}
|
||||
const data = await response.json();
|
||||
setLocations(data);
|
||||
//console.log("Geladene Daten in Home.js:", data);
|
||||
console.log("Geladene Daten in Home.js:", data);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
@@ -41,6 +41,7 @@ export default function Home() {
|
||||
|
||||
// Daten beim Laden der Seite holen
|
||||
loadData();
|
||||
|
||||
//console.log("poiReadTrigger in Home.js:", poiReadTrigger);
|
||||
}, [poiReadTrigger]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user