Fix dashboard URLs: remove /api prefix from fetch calls
Routes are registered under /app (web group), not /api/app. The requests were hitting the JWT-protected API group causing 'Invalid Attempt' error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
d1e56c8bd8
commit
7d02add55e
@@ -301,7 +301,7 @@
|
||||
|
||||
async cargarServidores() {
|
||||
try {
|
||||
const response = await fetch('/api/app/loadservidor?limit=100');
|
||||
const response = await fetch('/app/loadservidor?limit=100');
|
||||
const data = await response.json();
|
||||
this.servidores = data.registros || [];
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
async cargarConexionesServidor(servidor) {
|
||||
try {
|
||||
const response = await fetch(`/api/app/servidor-dashboard/${servidor.ID}`);
|
||||
const response = await fetch(`/app/servidor-dashboard/${servidor.ID}`);
|
||||
const data = await response.json();
|
||||
if (data.conexiones) {
|
||||
servidor.conexiones = data.conexiones;
|
||||
@@ -341,7 +341,7 @@
|
||||
async hacerPingConexion(conexion) {
|
||||
this.pingCargando[conexion.ID] = true;
|
||||
try {
|
||||
const response = await fetch(`/api/app/conx-ping/${conexion.ID}`);
|
||||
const response = await fetch(`/app/conx-ping/${conexion.ID}`);
|
||||
const data = await response.json();
|
||||
this.pingResultado[conexion.ID] = data;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user