Skip to content

Commit

Permalink
Merge pull request #103 from IrvingYHM/julio
Browse files Browse the repository at this point in the history
Cambio de rutas desplegadas
  • Loading branch information
jul1oCesar0 authored Nov 25, 2024
2 parents 2721d5e + bfd64db commit 110e8ee
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dev-dist/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ define(['./workbox-fde070c5'], (function (workbox) { 'use strict';
*/
workbox.precacheAndRoute([{
"url": "/offline.html",
"revision": "0.v36qbo87sfo"
"revision": "0.7scokde9ot8"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/offline.html"), {
Expand Down
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/components/Navegacion/barra.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function Barra() {
localStorage.removeItem("token");
setUserType(null);
setUsuarioLogueado(false);
navigate("/")
};

const handleSearch = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Rec2/CodigoRecuperacion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CodigoRecuperacion = ({ handleBack }) => {

const verificarCodigo = async (codigo) => {
try {
const response = await fetch("http://localhost:3000/clientes/Verificacion_codigo", {
const response = await fetch("https://backopt-production.up.railway.app/clientes/Verificacion_codigo", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
6 changes: 3 additions & 3 deletions src/views/Rec2/PreguntaS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const FormularioPregunta = ({ handleBack }) => {
const onSubmit = async (data) => {
try {
setProcesando(true);
const response = await fetch("http://localhost:3000/clientes/recuperar-contrasena", {
const response = await fetch("https://backopt-production.up.railway.app/clientes/recuperar-contrasena", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -89,7 +89,7 @@ const FormularioPregunta = ({ handleBack }) => {
const vchRespuestaSecreta = formData.get("answer");

try {
const response = await fetch("http://localhost:3000/clientes/verificar-respuesta", {
const response = await fetch("https://backopt-production.up.railway.app/clientes/verificar-respuesta", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -122,7 +122,7 @@ const FormularioPregunta = ({ handleBack }) => {

const enviarCodigoRecuperacion = async () => {
try {
const response = await fetch("http://localhost:3000/clientes/enviar_codigo", {
const response = await fetch("https://backopt-production.up.railway.app/clientes/enviar_codigo", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion src/views/Rec2/RecuperacionCodigo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const RecuperacionCodigo = ({ onBack }) => {
console.log(codigo);
try {
const response = await fetch(
"http://localhost:3000/clientes/Verificacion_codigo",
"https://backopt-production.up.railway.app/clientes/Verificacion_codigo",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Rec2/cambioCon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CambioContrasena = ({ correo }) => {

async function cambiarContraseña(nuevaContraseña){
try{
const response = await fetch('http://localhost:3000/clientes/cambiar-contrasena', {
const response = await fetch('https://backopt-production.up.railway.app/clientes/cambiar-contrasena', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
4 changes: 2 additions & 2 deletions src/views/Rec2/recuperar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Recuperar() {
if (method === 'code') {
try {
const response = await fetch(
"http://localhost:3000/clientes/enviar_codigo",
"https://backopt-production.up.railway.app/clientes/enviar_codigo",
{
method: "POST",
headers: {
Expand All @@ -47,7 +47,7 @@ function Recuperar() {
const onSubmit = async (data) => {
try {
const response = await fetch(
"http://localhost:3000/clientes/recuperar-contrasena",
"https://backopt-production.up.railway.app/clientes/recuperar-contrasena",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Recuperacion/RecuperacionCodigo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const RecuperacionCodigo = ({ onBack}) => {
console.log(codigo);
try {
const response = await fetch(
"http://localhost:3000/clientes/Verificacion_codigo",
"https://backopt-production.up.railway.app/clientes/Verificacion_codigo",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Recuperacion/RecuperacionPregunta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function RecuperacionPregunta() {
e.preventDefault();
try {
const response = await fetch(
"http://localhost:3000/clientes/verificar-respuesta",
"https://backopt-production.up.railway.app/clientes/verificar-respuesta",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Recuperacion/cambioCon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CambioContrasena = ({ correo }) => {

async function cambiarContraseña(nuevaContraseña){
try{
const response = await fetch('http://localhost:3000/clientes/cambiar-contrasena', {
const response = await fetch('https://backopt-production.up.railway.app/clientes/cambiar-contrasena', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
4 changes: 2 additions & 2 deletions src/views/Recuperacion/recuperar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Recuperar() {
if (method === 'code') {
try {
const response = await fetch(
"http://localhost:3000/clientes/enviar_codigo",
"https://backopt-production.up.railway.app/clientes/enviar_codigo",
{
method: "POST",
headers: {
Expand All @@ -50,7 +50,7 @@ function Recuperar() {
const onSubmit = async (data) => {
try {
const response = await fetch(
"http://localhost:3000/clientes/recuperar-contrasena",
"https://backopt-production.up.railway.app/clientes/recuperar-contrasena",
{
method: "POST",
headers: {
Expand Down
4 changes: 2 additions & 2 deletions src/views/Registro/InfoPersonal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ function InfoPersonal({ onNext, onBack, onValidationChange, setMaxWidth }) {
className="mt-1 p-2 border rounded-md w-full"
>
<option value="">Seleccionar</option>
<option value="Masculino">Masculino</option>
<option value="Femenino">Femenino</option>
<option value="M">Masculino</option>
<option value="F">Femenino</option>
</select>
</div>
{errors.chrSexo && (
Expand Down
2 changes: 1 addition & 1 deletion src/views/Registro/RContraseña.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const RContraseña = ({ onNext, onBack, onValidationChange, setMaxWidth }) => {
/* console.log("Datos a enviar al backend:", info);
console.log(vchPassword) */
const response = await fetch(
"http://localhost:3000/clientes/",
"https://backopt-production.up.railway.app/clientes/",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Registro/RDireccion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const RDireccion = ({ onNext, onBack, onValidationChange, setMaxWidth }) => {
// Envía los datos al servidor
try {
const response = await fetch(
"http://localhost:3000/direcciones-clientes/",
"https://backopt-production.up.railway.app/direcciones-clientes/",
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Registro/getId_Cliente.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fetchIdCliente = async (email) => {
try {
const response = await fetch(
`http://localhost:3000/clientes/?email=${email}`
`https://backopt-production.up.railway.app/clientes/?email=${email}`
);
const data = await response.json();
if (data) {
Expand Down

0 comments on commit 110e8ee

Please sign in to comment.