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());