File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,20 @@ document.addEventListener('DOMContentLoaded', async function () {
33 try {
44 async function consumirApiProductos ( ) {
55 try {
6- const respuesta = await fetch ( './js/productos.json' ) ;
6+ const respuesta = await fetch ( '.. /js/productos.json' ) ;
77 const datos = await respuesta . json ( ) ;
88 return datos ;
99 } catch ( error ) {
10- console . error ( "Error al consumir la primera API:" , error ) ;
1110 return [ ] ;
1211 }
1312 }
1413
1514 async function consumirApiProductosCarrete ( ) {
1615 try {
17- const respuesta = await fetch ( './js/productosCarrete.json' ) ;
16+ const respuesta = await fetch ( '.. /js/productosCarrete.json' ) ;
1817 const datos = await respuesta . json ( ) ;
1918 return datos ;
2019 } catch ( error ) {
21- console . error ( "Error al consumir la segunda API:" , error ) ;
2220 return [ ] ;
2321 }
2422 }
You can’t perform that action at this time.
0 commit comments