From 0c6237ed0155072bb23c077e9687f8c931f20d56 Mon Sep 17 00:00:00 2001 From: Howl Date: Sat, 28 May 2016 23:48:29 +0200 Subject: [PATCH] Use userid rather than username --- app/peppy/user_x.go | 2 +- app/v1/user_scores.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/peppy/user_x.go b/app/peppy/user_x.go index 31adffa..755ab64 100644 --- a/app/peppy/user_x.go +++ b/app/peppy/user_x.go @@ -39,7 +39,7 @@ func getUserX(c *gin.Context, db *sql.DB, orderBy string, limit int) { scores.pp, scores.accuracy FROM scores LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5 - LEFT JOIN users ON scores.username = users.username + LEFT JOIN users ON scores.userid = users.id WHERE %s AND scores.play_mode = ? %s LIMIT %d`, whereClause, orderBy, limit, diff --git a/app/v1/user_scores.go b/app/v1/user_scores.go index 5ad4e5b..31540e2 100644 --- a/app/v1/user_scores.go +++ b/app/v1/user_scores.go @@ -53,7 +53,7 @@ SELECT beatmaps.ranked_status_freezed, beatmaps.latest_update FROM scores LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5 -LEFT JOIN users ON users.username = scores.username +LEFT JOIN users ON users.id = scores.userid ` // UserScoresBestGET retrieves the best scores of an user, sorted by PP if