We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1072f1 commit 16e2c2bCopy full SHA for 16e2c2b
src/rest/info/info.controller.ts
@@ -57,7 +57,9 @@ export class InfoController {
57
@Get("current_online")
58
@CacheTTL(10)
59
public async getCurrentOnline(): Promise<number> {
60
- const allSessions = await this.gameServerSessionModelRepository.find();
+ const allSessions = await this.gameServerSessionModelRepository.find({
61
+ relations: ['players']
62
+ });
63
return allSessions.reduce((a, b) => a + b.players.length, 0);
64
}
65
0 commit comments