add some optimization
Some checks failed
Deploy Backend / docker (ubuntu-latest) (push) Failing after 32s
Some checks failed
Deploy Backend / docker (ubuntu-latest) (push) Failing after 32s
This commit is contained in:
parent
069a566d40
commit
78c8c1ba98
@ -363,17 +363,18 @@ export class ScoreService {
|
||||
};
|
||||
}
|
||||
|
||||
const additionalData = await ScoreService.getAdditionalScoreData(
|
||||
const [additionalData, previousScore] = await Promise.all([
|
||||
this.getAdditionalScoreData(
|
||||
score.playerId,
|
||||
leaderboard.songHash,
|
||||
`${leaderboard.difficulty.difficulty}-${leaderboard.difficulty.characteristic}`,
|
||||
score.score
|
||||
);
|
||||
),
|
||||
this.getPreviousScore(score.playerId, leaderboard.id + "", score.timestamp),
|
||||
]);
|
||||
if (additionalData) {
|
||||
score.additionalData = additionalData;
|
||||
}
|
||||
|
||||
const previousScore = await this.getPreviousScore(score.playerId, leaderboard.id + "", score.timestamp);
|
||||
if (previousScore) {
|
||||
score.previousScore = previousScore;
|
||||
}
|
||||
|
Reference in New Issue
Block a user