changed order of listActiveRooms
This commit is contained in:
@@ -24,6 +24,8 @@ services:
|
||||
build: ./srcs/backend
|
||||
expose:
|
||||
- "3001"
|
||||
# ports:
|
||||
# - "3001:3001"
|
||||
depends_on:
|
||||
- database
|
||||
# volumes:
|
||||
|
||||
@@ -34,7 +34,7 @@ async function listActiveRooms()
|
||||
LEFT JOIN game_players p ON r.id = p.room_id
|
||||
WHERE r.status = 'waiting'
|
||||
GROUP BY r.id
|
||||
ORDER BY r.created_at DESC`
|
||||
ORDER BY player_count DESC, r.created_at DESC`
|
||||
);
|
||||
return (result.rows);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user