Skip to content

Commit

Permalink
Update server.service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
btwlouis authored Aug 3, 2024
1 parent fc27d80 commit e4778f6
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions backend/services/server.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ export async function insertOrUpdate(serverData: IServerView) {
export async function getAll(amount: number = 300) {
// order by clients desc
return await Server.find(
{},
{
id: 1,
connectEndPoints: 1,
hostname: 1,
playersCurrent: 1,
playersMax: 1,
mapname: 1,
historicalIconURL: 1,
iconVersion: 1,
joinId: 1,
gametype: 1,
}
)
{})
.select(
{
id: 1,
connectEndPoints: 1,
hostname: 1,
playersCurrent: 1,
playersMax: 1,
mapname: 1,
historicalIconURL: 1,
iconVersion: 1,
joinId: 1,
gametype: 1,
}
)
.sort({ playersCurrent: -1 })
.limit(amount);
}
Expand Down

0 comments on commit e4778f6

Please sign in to comment.