This commit is contained in:
2026-03-27 19:44:27 +01:00
parent 144845f32f
commit d38b31d954
2 changed files with 12 additions and 7 deletions
+8 -1
View File
@@ -1,7 +1,14 @@
const API_BASE = 'http://localhost:3000'; // Backend URL
const API_BASE = 'http://192.168.178.41:3000'; // Backend URL
export async function fetchCards() {
const response = await fetch(`${API_BASE}/exportCards`);
if (!response.ok) throw new Error('Failed to fetch cards');
return await response.json();
}
export async function fetchCardImage(cardId) {
const response = await fetch(`${API_BASE}/cardImage/${cardId}`);
if (!response.ok) throw new Error('Failed to fetch card image');
const data = await response.json();
return data.image;
}