This commit is contained in:
depreciate 2019-02-05 11:38:42 +10:30
parent ea60434e8d
commit 19f4d987ac
1 changed files with 1 additions and 27 deletions

View File

@ -85,19 +85,6 @@ def getUserStatsRx(userID, gameMode):
:return: dictionary with result
"""
modeForDB = gameModes.getGameModeForDB(gameMode)
if gameMode == 3:
# Get stats
stats = glob.db.fetch("""SELECT
ranked_score_{gm} AS rankedScore,
avg_accuracy_{gm} AS accuracy,
playcount_{gm} AS playcount,
total_score_{gm} AS totalScore,
pp_{gm} AS pp
FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID])
# Get game rank
else:
# Get stats
stats = glob.db.fetch("""SELECT
ranked_score_{gm}_rx AS rankedScore,
@ -122,21 +109,8 @@ def getUserStatsAp(userID, gameMode):
:return: dictionary with result
"""
modeForDB = gameModes.getGameModeForDB(gameMode)
if gameMode == 3:
# Get stats
stats = glob.db.fetch("""SELECT
ranked_score_{gm} AS rankedScore,
avg_accuracy_{gm} AS accuracy,
playcount_{gm} AS playcount,
total_score_{gm} AS totalScore,
pp_{gm} AS pp
FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID])
# Get game rank
else:
# Get stats
stats = glob.db.fetch("""SELECT
stats = glob.db.fetch("""SELECT
ranked_score_{gm}_ap AS rankedScore,
avg_accuracy_{gm}_ap AS accuracy,
playcount_{gm}_ap AS playcount,