1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: case sensitivity with leaderboard languages (resolve #418)

This commit is contained in:
Ferdinand Mütsch
2022-10-07 08:58:51 +02:00
parent 1e9d3f9e80
commit bc99dc990a
4 changed files with 8 additions and 7 deletions

View File

@@ -87,8 +87,9 @@ func (h *LeaderboardHandler) buildViewModel(r *http.Request) *view.LeaderboardVi
topKeys = leaderboard.TopKeys(by)
if len(topKeys) > 0 {
if keyParam == "" {
keyParam = strings.ToLower(topKeys[0])
keyParam = topKeys[0]
}
keyParam = strings.ToLower(keyParam)
leaderboard = leaderboard.TopByKey(by, keyParam)
}
} else {