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

View File

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