File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class LeaderboardRepository {
27
27
LEFT JOIN start_stats ss ON ss.post_id = p.id
28
28
WHERE u.email IS NOT NULL
29
29
GROUP BY u.id, u.email
30
- ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC
30
+ ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC, u.id
31
31
LIMIT $2;
32
32
` ;
33
33
const result = await this . pool . query ( query , [ dateRange , limit ] ) ;
@@ -58,7 +58,7 @@ export class LeaderboardRepository {
58
58
LEFT JOIN today_stats ts ON ts.post_id = p.id
59
59
LEFT JOIN start_stats ss ON ss.post_id = p.id
60
60
WHERE p.is_active = true
61
- ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC
61
+ ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC, p.id
62
62
LIMIT $2;
63
63
` ;
64
64
const result = await this . pool . query ( query , [ dateRange , limit ] ) ;
You can’t perform that action at this time.
0 commit comments