diff --git a/webapp/src/pages/Bateria/Bateria.js b/webapp/src/pages/Bateria/Bateria.js index d8dadaca..443613c2 100644 --- a/webapp/src/pages/Bateria/Bateria.js +++ b/webapp/src/pages/Bateria/Bateria.js @@ -89,11 +89,11 @@ const JuegoPreguntas = () => { }, }; - saveGame("/saveGame"); - saveGame("/saveGameList"); + saveGame("/saveGame", newGame); + saveGame("/saveGameList", newGame); }; - const saveGame = async (endpoint) => { + const saveGame = async (endpoint, newGame) => { try { const response = await axios.post(URL + endpoint, newGame); console.log("Solicitud exitosa:", response.data);