feat: only show succesful attempts in leaderboard
This commit is contained in:
parent
fa3548f5bf
commit
1f92121491
@ -74,6 +74,7 @@ public class PuzzleController {
|
|||||||
List<PuzzleAttempt> attempts = puzzleService.getTodaysLeaderboard();
|
List<PuzzleAttempt> attempts = puzzleService.getTodaysLeaderboard();
|
||||||
|
|
||||||
List<LeaderboardEntry> leaderboard = attempts.stream()
|
List<LeaderboardEntry> leaderboard = attempts.stream()
|
||||||
|
.filter(attempt -> attempt.isSolved())
|
||||||
.map(attempt -> new LeaderboardEntry(
|
.map(attempt -> new LeaderboardEntry(
|
||||||
attempt.getUser().getDisplayName(),
|
attempt.getUser().getDisplayName(),
|
||||||
attempt.getUser().getUsername(),
|
attempt.getUser().getUsername(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user