fix(fronts): reemplazar IP hardcodeada 192.168.10.123 por /api relativo en TODOS los archivos

Causa raiz: import.meta.env.VITE_API_URL ?? '/api' no activa el fallback
cuando VITE_API_URL es string vacio (?? solo cubre null/undefined).
Cambiado a || en auth.ts y sistema.ts de todas las apps.

Tambien reemplazada la IP hardcodeada en api.ts, mi-dia.ts, reportes.ts
y agente-ia.api.ts de todas las apps. Ahora funciona desde IP y dominio
sin depender de la red local.
This commit is contained in:
2026-09-06 18:50:33 +00:00
parent 1597c6be34
commit 97c4e5cdf3
18 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
// Cliente HTTP del API Gateway de FRASA (Express + Prisma)
const API_URL = import.meta.env.VITE_API_URL ?? 'http://192.168.10.123:3000/api'
const API_URL = import.meta.env.VITE_API_URL ?? '/api'
// TODO produccion: '/api' same-origin detras de NGINX
import { conAuth, manejar401 } from './auth'