Skip to content

Commit

Permalink
Merge pull request #250 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Arreglo url
  • Loading branch information
mariolada authored May 4, 2022
2 parents 6348d9f + 2c15639 commit 03463d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webapp/src/componentes/editarProducto/editarProducto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ var categoria: string;
var precio: number;

async function getJuguete(): Promise<Juguete> {
//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
Expand All @@ -22,7 +21,7 @@ async function getJuguete(): Promise<Juguete> {
}

async function updateJuguete(): Promise<any> {
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',
Expand Down

0 comments on commit 03463d3

Please sign in to comment.