add additional data and previous score in top scores response
Some checks failed
Deploy Backend / docker (ubuntu-latest) (push) Failing after 32s

This commit is contained in:
Lee 2024-10-29 18:45:34 +00:00
parent 8011ed7b5a
commit 069a566d40

@ -373,6 +373,11 @@ export class ScoreService {
score.additionalData = additionalData; score.additionalData = additionalData;
} }
const previousScore = await this.getPreviousScore(score.playerId, leaderboard.id + "", score.timestamp);
if (previousScore) {
score.previousScore = previousScore;
}
scores.push({ scores.push({
score: score, score: score,
leaderboard: leaderboard, leaderboard: leaderboard,