Comunicacion con backend
This commit is contained in:
parent
9dcc8324a8
commit
108aecf10c
|
|
@ -13,7 +13,7 @@ async function login() {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch("http://localhost:8080/auth/login", {
|
const response = await fetch("http://recursos-catolicos.es:8080/auth/login", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ email, password })
|
body: JSON.stringify({ email, password })
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
msg.textContent = "No se pudo conectar con el servidor.";
|
msg.textContent = "No se pudo conectar con el servidor." + e;
|
||||||
msg.classList.add("error");
|
msg.classList.add("error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue