Send Rang to frontend

This commit is contained in:
2025-04-29 10:30:40 +02:00
parent 873f1e367e
commit 08a8f567c4

View File

@@ -24,10 +24,12 @@ class HighScoreRoute {
for(const highscore of highscores){
const user1 = await this.db.usermanager.getUser({id: highscore.user1ID});
const user2 = await this.db.usermanager.getUser({id: highscore.user2ID});
const rang = highscores.indexOf(highscore) + 1;
returnJSON.scores.push({
id: highscore.id,
score: highscore.score,
rang: rang,
user1: {
id: user1.id,
username: user1.username,