summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/api
diff options
context:
space:
mode:
authorgabrhr <[email protected]>2022-05-30 20:08:04 -0500
committergabrhr <[email protected]>2022-05-30 20:08:04 -0500
commit32fb17de8f78317b165b6f269a8bab2d4e852d0d (patch)
tree2de1643fcda13cc5c9c0f28ffcb7a7211d9e2922 /front/odiparpack/app/api
parent9c396976bb42a9d41407358ce1a1d37242230f21 (diff)
downloadDP1_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.js8
-rw-r--r--front/odiparpack/app/api/pedido.js18
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