barter-system
This commit is contained in:
parent
40165f834e
commit
2452c912c2
@ -31,10 +31,10 @@ async function loadDashboardData() {
|
|||||||
// --- IMPORTANT ---
|
// --- IMPORTANT ---
|
||||||
// Replace this URL with the actual URL of your Node.js backend API.
|
// Replace this URL with the actual URL of your Node.js backend API.
|
||||||
// When running locally, your Node.js server might be on a different port.
|
// When running locally, your Node.js server might be on a different port.
|
||||||
const API_URL = 'http://localhost:4000/api/trades/received';
|
const API_URL = 'http://localhost:4000/api/products';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(backendApiUrl);
|
const response = await fetch(API_URL);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// If the response is not OK (e.g., 404, 500), throw an error.
|
// If the response is not OK (e.g., 404, 500), throw an error.
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|||||||
BIN
assets/pasted-20251110-021937-fe12aa28.png
Normal file
BIN
assets/pasted-20251110-021937-fe12aa28.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
Loading…
x
Reference in New Issue
Block a user