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