diff options
| author | gabrhr <[email protected]> | 2022-05-30 20:08:04 -0500 |
|---|---|---|
| committer | gabrhr <[email protected]> | 2022-05-30 20:08:04 -0500 |
| commit | 32fb17de8f78317b165b6f269a8bab2d4e852d0d (patch) | |
| tree | 2de1643fcda13cc5c9c0f28ffcb7a7211d9e2922 /front/odiparpack/app/api | |
| parent | 9c396976bb42a9d41407358ce1a1d37242230f21 (diff) | |
| download | DP1_project-32fb17de8f78317b165b6f269a8bab2d4e852d0d.tar.gz DP1_project-32fb17de8f78317b165b6f269a8bab2d4e852d0d.tar.bz2 DP1_project-32fb17de8f78317b165b6f269a8bab2d4e852d0d.zip | |
Fix axios and add new
- FIX logica de aƱadiir (ok)
- FIX axios y dispatch fuera de un componente (ok)
- Cambiar las notificaciones
Diffstat (limited to 'front/odiparpack/app/api')
| -rw-r--r-- | front/odiparpack/app/api/notifMessage.js | 8 | ||||
| -rw-r--r-- | front/odiparpack/app/api/pedido.js | 18 |
2 files changed, 19 insertions, 7 deletions
diff --git a/front/odiparpack/app/api/notifMessage.js b/front/odiparpack/app/api/notifMessage.js index 2d2b48b..bc7a60c 100644 --- a/front/odiparpack/app/api/notifMessage.js +++ b/front/odiparpack/app/api/notifMessage.js @@ -1,10 +1,10 @@ module.exports = { - saved: 'Data has been saved', - updated: 'Data has been updated', - removed: 'Item has been removed', + saved: 'Se ha guardado correctamente', + updated: 'Se ha actualizado correctamente', + removed: 'Se ha eliminado correctamente', posted: 'Your post has been submitted', commented: 'Your comment has been submitted', - discard: 'Action canceled', + discard: 'Cancelado', addCart: 'Item added to cart', checkout: 'Thank you for shopping', sent: 'Email sent', 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 |
