HOTFIX: ladder order

This commit is contained in:
2019-06-10 18:29:01 +10:00
parent e266725e03
commit dc08910458
+1 -1
View File
@@ -111,7 +111,7 @@ const isSpying = (connection, user, cb) => {
const getLadderData = (connection, field, start, length, cb) => {
//moved here for reusability
let query = 'SELECT accounts.id AS id, username, soldiers, recruits, gold FROM accounts JOIN profiles ON accounts.id = profiles.accountId ORDER BY ? DESC LIMIT ?, ?;';
let query = 'SELECT accounts.id AS id, username, soldiers, recruits, gold FROM accounts JOIN profiles ON accounts.id = profiles.accountId ORDER BY ladderRank DESC LIMIT ?, ?;';
connection.query(query, [field, start, length], (err, results) => {
cb(err, results);
});