Skip to content

Commit

Permalink
fix: return leadarboard top
Browse files Browse the repository at this point in the history
  • Loading branch information
elegantShock2258 committed Jan 12, 2024
1 parent 9dbd026 commit 2ffbf93
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class StatsService(@Autowired private val statsRepository:StatsRepository,
val topUserUUID = publicUserRepository.findAll(pageRequest).get().findFirst().get().userId
val topUser = statsRepository.findById(topUserUUID).get()
var lTop = convertToDTO(topUser)
if(!statsRepository.existsById(userId)){
val userExists = statsRepository.existsById(userId)
if(!userExists || (userId == topUserUUID)){
l.add(lTop)
return l
}
Expand Down

0 comments on commit 2ffbf93

Please sign in to comment.