Skip to content

Commit

Permalink
Merge pull request #249 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 1725f2e + 03f2ba4 commit 9be18d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions webapp/src/PayForm/ProcesoPago.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ async function finalizarPedido(precioGastosDeEnvio: string, juguetes: Juguete[],
var price: number;
price = calculateTotal(juguetes);
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 + '/pedido', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
Expand All @@ -59,9 +58,8 @@ async function finalizarPedido(precioGastosDeEnvio: string, juguetes: Juguete[],

// Petición para obtener los gastos de envio
async function getGastosEnvio(): Promise<any> {
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 + 'pedido/gastosEnvio/', {
const apiEndPoint = process.env.REACT_APP_API_URI || 'http://localhost:5000'
let response = await fetch(apiEndPoint + '/pedido/gastosEnvio/', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ "direccion": localStorage.getItem("direccion") })
Expand Down

0 comments on commit 9be18d9

Please sign in to comment.