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([
|
||||||
score.playerId,
|
this.getAdditionalScoreData(
|
||||||
leaderboard.songHash,
|
score.playerId,
|
||||||
`${leaderboard.difficulty.difficulty}-${leaderboard.difficulty.characteristic}`,
|
leaderboard.songHash,
|
||||||
score.score
|
`${leaderboard.difficulty.difficulty}-${leaderboard.difficulty.characteristic}`,
|
||||||
);
|
score.score
|
||||||
|
),
|
||||||
|
this.getPreviousScore(score.playerId, leaderboard.id + "", score.timestamp),
|
||||||
|
]);
|
||||||
if (additionalData) {
|
if (additionalData) {
|
||||||
score.additionalData = additionalData;
|
score.additionalData = additionalData;
|
||||||
}
|
}
|
||||||
|
|
||||||
const previousScore = await this.getPreviousScore(score.playerId, leaderboard.id + "", score.timestamp);
|
|
||||||
if (previousScore) {
|
if (previousScore) {
|
||||||
score.previousScore = previousScore;
|
score.previousScore = previousScore;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user