From 8ec5a331b09ca21b87044fe7a3c4fd8db9b8cdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mu=C3=B1iz?= Date: Tue, 3 May 2022 00:02:23 +0200 Subject: [PATCH] Cambiando url --- webapp/src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/src/App.tsx b/webapp/src/App.tsx index 23dc6d1..75f16b6 100644 --- a/webapp/src/App.tsx +++ b/webapp/src/App.tsx @@ -56,8 +56,8 @@ export type Juguete = { // AÑADIDO--------------------------------------------------------------------------------------------- // Petición para obtener todos los juguetes de la base de datos export async function getJuguetes(): Promise { - const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000/' - //const apiEndPoint= process.env.REACT_APP_API_URI || 'https://dede-en2a-restapi.herokuapp.com' + //const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000/' + const apiEndPoint= process.env.REACT_APP_API_URI || 'https://dede-es2a-restapi.herokuapp.com/' let response = await fetch(apiEndPoint + 'juguete/withstock'); //The objects returned by the api are directly convertible to User objects //console.log(response.json()); @@ -65,8 +65,8 @@ export async function getJuguetes(): Promise { } export async function getJuguetesCategoria(): Promise { - const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000/' - //const apiEndPoint= process.env.REACT_APP_API_URI || 'https://dede-en2a-restapi.herokuapp.com' + //const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000/' + const apiEndPoint= process.env.REACT_APP_API_URI || 'https://dede-es2a-restapi.herokuapp.com/' let response = await fetch(apiEndPoint + 'juguete/categoria/nostalgia'); //The objects returned by the api are directly convertible to User objects //console.log(response.json());