update API endpoints in Landingpage component to use production URLs

This commit is contained in:
2025-09-24 17:57:44 +02:00
parent 85b519c5b1
commit 451a5a92dd

View File

@@ -57,7 +57,9 @@ const Landingpage: React.FC = () => {
const fetchData = async () => { const fetchData = async () => {
setIsLoading(true); setIsLoading(true);
try { try {
const loanRes = await fetch("http://localhost:8002/apiV2/allLoans"); const loanRes = await fetch(
"https://backend.insta.the1s.de/apiV2/allLoans"
);
const loanData = await loanRes.json(); const loanData = await loanRes.json();
if (Array.isArray(loanData)) { if (Array.isArray(loanData)) {
setLoans(loanData); setLoans(loanData);
@@ -69,7 +71,9 @@ const Landingpage: React.FC = () => {
); );
} }
const deviceRes = await fetch("http://localhost:8002/apiV2/allItems"); const deviceRes = await fetch(
"https://backend.insta.the1s.de/apiV2/allItems"
);
const deviceData = await deviceRes.json(); const deviceData = await deviceRes.json();
if (Array.isArray(deviceData)) { if (Array.isArray(deviceData)) {
setDevices(deviceData); setDevices(deviceData);