」 feat(front): added tetris front and some minor fixes

This commit is contained in:
y-syo
2025-10-20 16:18:48 +02:00
parent 8a9224bd88
commit b5a91f0bab
8 changed files with 938 additions and 32 deletions

View File

@ -147,18 +147,19 @@ export default class extends Aview {
if (await isLogged())
{
let uuid = document.cookie.match(new RegExp('(^| )' + "uuid" + '=([^;]+)'))[2];
fetch(`http://localhost:3002/users/${uuid}/matchHistory`, {
fetch(`http://localhost:3002/users/${uuid}/matchHistory?game=pong`, {
method: "POST",
headers: { "Content-Type": "application/json", },
credentials: "include",
body: JSON.stringify({ "opponent": p2_name, "myScore": p1_score, "opponentScore": p2_score })
body: JSON.stringify({
"game": "pong",
"opponent": p2_name,
"myScore": p1_score,
"opponentScore": p2_score,
"date": Date.now(),
}),
});
}
// ------------------------------------------------------------------------------------------------------------------------------------------
//
// insert the fetch to the ScoreStore api here
//
// ------------------------------------------------------------------------------------------------------------------------------------------
match_over = true;
}
else