Skip to content

Commit

Permalink
Cambiando url
Browse files Browse the repository at this point in the history
  • Loading branch information
UO271728 committed May 2, 2022
1 parent 144f39f commit 8ec5a33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ export type Juguete = {
// AÑADIDO---------------------------------------------------------------------------------------------
// Petición para obtener todos los juguetes de la base de datos
export async function getJuguetes(): Promise<Juguete[]> {
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());
return response.json();
}

export async function getJuguetesCategoria(): Promise<Juguete[]> {
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());
Expand Down

0 comments on commit 8ec5a33

Please sign in to comment.