From 32fb17de8f78317b165b6f269a8bab2d4e852d0d Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Mon, 30 May 2022 20:08:04 -0500 Subject: Fix axios and add new MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FIX logica de aƱadiir (ok) - FIX axios y dispatch fuera de un componente (ok) - Cambiar las notificaciones --- front/odiparpack/app/api/pedido.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'front/odiparpack/app/api/pedido.js') diff --git a/front/odiparpack/app/api/pedido.js b/front/odiparpack/app/api/pedido.js index 7cfb3f7..63d6e2e 100644 --- a/front/odiparpack/app/api/pedido.js +++ b/front/odiparpack/app/api/pedido.js @@ -1,6 +1,18 @@ -import { apiPost, apiGet, apiDelete, apiPut } from "odi-utils/api"; +import axios from 'axios'; +import { apiGet } from '../utils/odipar/api'; //GET APIS -export const getPedidosAPI = () => { - return apiGet('ayuda/') +export const getPedidosAPI = async () => { + return await apiGet(`ayuda/`) +} + +export function getAPi(){ + axios.get( + `http://localhost:8083/ayuda/`, //TODO: check currentTimeStamp + { + headers: { + 'Content-type': 'application/json', + }, + } + ) } \ No newline at end of file -- cgit v1.2.3