diff --git a/src/views/Admin/Empleados/iniciarSEmpleado.jsx b/src/views/Admin/Empleados/iniciarSEmpleado.jsx index a62705a..242bc0a 100644 --- a/src/views/Admin/Empleados/iniciarSEmpleado.jsx +++ b/src/views/Admin/Empleados/iniciarSEmpleado.jsx @@ -43,7 +43,7 @@ function App() { if (captcha.current.getValue()) { console.log("El usuario no es un robot"); try { - const response = await fetch("http://localhost:3000/empleados/login", { + const response = await fetch("https://backopt-production.up.railway.app/empleados/login", { method: "POST", headers: { "Content-Type": "application/json", diff --git a/src/views/Perfil/CambiarContra.jsx b/src/views/Perfil/CambiarContra.jsx index 4de2458..7d8c665 100644 --- a/src/views/Perfil/CambiarContra.jsx +++ b/src/views/Perfil/CambiarContra.jsx @@ -42,7 +42,7 @@ function App() { try { const response = await fetch( - `http://localhost:3000/clientes/clientes/${clienteId}/password`, + `https://backopt-production.up.railway.app/clientes/clientes/${clienteId}/password`, { method: "POST", headers: { diff --git a/src/views/Perfil/Menu.jsx b/src/views/Perfil/Menu.jsx index 1f07743..296ac0e 100644 --- a/src/views/Perfil/Menu.jsx +++ b/src/views/Perfil/Menu.jsx @@ -37,7 +37,7 @@ function ProfileCard() { const fetchProfileData = async (clienteId) => { try { const response = await fetch( - `http://localhost:3000/clientes/id/${clienteId}` + `https://backopt-production.up.railway.app/clientes/id/${clienteId}` ); const data = await response.json(); setProfileData(data); diff --git a/src/views/Perfil/cambioCon.jsx b/src/views/Perfil/cambioCon.jsx index 8001c49..99c39fa 100644 --- a/src/views/Perfil/cambioCon.jsx +++ b/src/views/Perfil/cambioCon.jsx @@ -58,7 +58,7 @@ const CambioContrasena = () => { async function cambiarContraseña(nuevaContraseña) { try { const response = await fetch( - `http://localhost:3000/clientes/${clienteId}/password`, // Modificado para incluir el id del cliente + `https://backopt-production.up.railway.app/clientes/${clienteId}/password`, // Modificado para incluir el id del cliente { method: "POST", headers: { diff --git a/src/views/Perfil/verDireccion.jsx b/src/views/Perfil/verDireccion.jsx index ef8b8e6..4db0429 100644 --- a/src/views/Perfil/verDireccion.jsx +++ b/src/views/Perfil/verDireccion.jsx @@ -35,7 +35,7 @@ function VerEditarDireccion() { useEffect(() => { if (clienteId) { - fetch(`http://localhost:3000/clientes/clientes/${clienteId}/direccion`) + fetch(`https://backopt-production.up.railway.app/clientes/clientes/${clienteId}/direccion`) .then((response) => { if (!response.ok) { throw new Error("Error al obtener la dirección del cliente"); @@ -57,7 +57,7 @@ function VerEditarDireccion() { }; const guardarCambios = () => { - fetch(`http://localhost:3000/clientes/actualizar/${clienteId}/direccion`, { + fetch(`https://backopt-production.up.railway.app/clientes/actualizar/${clienteId}/direccion`, { method: "PUT", headers: { "Content-Type": "application/json", diff --git a/src/views/iniciarS.jsx b/src/views/iniciarS.jsx index 80ba063..3855d53 100644 --- a/src/views/iniciarS.jsx +++ b/src/views/iniciarS.jsx @@ -56,7 +56,7 @@ useEffect(() => { console.log("El usuario no es un robot"); try { const response = await fetch( - "http://localhost:3000/auth/login", + "https://backopt-production.up.railway.app/auth/login", { method: "POST", headers: {