diff --git a/js/login.js b/js/login.js index 86aa3a3..19fac78 100644 --- a/js/login.js +++ b/js/login.js @@ -13,7 +13,7 @@ formulario.addEventListener("submit", async (event) => { data.append("contrasena", contrasena); try { - const respuestaPeticion = await fetch("../controllers/LoginController.php", { + const respuestaPeticion = await fetch("controllers/LoginController.php", { method: "POST", body: data, }); @@ -24,7 +24,7 @@ formulario.addEventListener("submit", async (event) => { window.location.href = 'views/inicio.html'; } else if(respuesta.estado === 'error') { notificacion.textContent = respuesta.mensaje; - if(respuesta.res){ + if(respuesta.res){ // Si existe respuesta.res hubo un error y se imprime en consola console.error(respuesta.res) } notificacion.style.display = "block";