Bestenliste

This commit is contained in:
2025-05-02 12:38:45 +02:00
parent dad3d8826d
commit b36d7a4274
4 changed files with 40 additions and 13 deletions

View File

@@ -8,19 +8,19 @@ class HighScoreLoader{
}
async setup(){
const response = await fetch("/api/highscore");
this.data = await response.json();
// const response = await fetch("/api/highscore");
// this.data = await response.json();
for(const score of this.data.scores){
this.table.innerHTML += `
<tr>
<td>${score.rang}</td>
<td>${score.user1.username}</td>
<td>${score.user2.username}</td>
<td>${score.score}</td>
</tr>
`
}
// for(const score of this.data.scores){
// this.table.innerHTML += `
// <tr>
// <td>${score.rang}</td>
// <td>${score.user1.username}</td>
// <td>${score.user2.username}</td>
// <td>${score.score}</td>
// </tr>
// `;
// }
}
}