This commit is contained in:
jose-rZM
2025-12-15 11:42:17 +01:00
commit c3f7af7379
33 changed files with 5004 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { API_BASE } from '../config';
async function getJson(endpoint) {
const response = await fetch(`${API_BASE}${endpoint}`);
if (!response.ok) {
throw new Error('Respuesta no valida del servidor');
}
return response.json();
}
export async function getMenu() {
return getJson('/menu');
}
export async function getPrices() {
const data = await getJson('/prices');
return data.items || [];
}
export async function getCiStatus() {
return getJson('/health');
}