From 2c156393592e734e2a7748d93863834a56a6ed5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mu=C3=B1iz?= Date: Wed, 4 May 2022 11:32:25 +0200 Subject: [PATCH] Arreglo url --- webapp/src/componentes/editarProducto/editarProducto.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webapp/src/componentes/editarProducto/editarProducto.tsx b/webapp/src/componentes/editarProducto/editarProducto.tsx index 5d15f73..a4b3720 100644 --- a/webapp/src/componentes/editarProducto/editarProducto.tsx +++ b/webapp/src/componentes/editarProducto/editarProducto.tsx @@ -12,8 +12,7 @@ var categoria: string; var precio: number; async function getJuguete(): Promise { - //const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000/' - const apiEndPoint = process.env.API_URL || 'http://localhost:5000' + const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000' let partes = url.split('/'); let response = await fetch(apiEndPoint + "/juguete/" + partes[partes.length - 1]); //The objects returned by the api are directly convertible to User objects @@ -22,7 +21,7 @@ async function getJuguete(): Promise { } async function updateJuguete(): Promise { - const apiEndPoint = process.env.API_URL || 'http://localhost:5000' + const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000' let partes = url.split('/'); let response = await fetch(apiEndPoint + "/juguete/update/" + partes[partes.length - 1], { method: 'POST',