diff --git a/webapp/src/components/game/gameModes/DailyGameMode.js b/webapp/src/components/game/gameModes/DailyGameMode.js index 34e9925..f1e59ec 100644 --- a/webapp/src/components/game/gameModes/DailyGameMode.js +++ b/webapp/src/components/game/gameModes/DailyGameMode.js @@ -36,13 +36,19 @@ class DailyGameMode extends BasicGame{ async incrementAcertadas(){ try { + const volverJugarData = { + user: null, + fecha : this.fechaAct + }; + //sacar del localStorage el usuario + volverJugarData.user = localStorage.getItem('username'); console.log("enviar historial trycatch"); const response = await fetch(`${this.apiEndpoint}/updateHistoryDiaria`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify("{user: "+ localStorage.getItem('username') +"}") + body: JSON.stringify(volverJugarData) }); const data = await response.json(); console.log('Historial enviado:', data);