Skip to content

Commit 587c38f

Browse files
committed
Fix yet again!
1 parent 16e2c2b commit 587c38f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/gameserver/model/game-server-session.entity.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class GameServerSessionEntity {
3737
@Column({ type: "timestamptz", default: () => "now()" })
3838
timestamp: Date;
3939

40-
@OneToMany(() => GameSessionPlayerEntity, (t) => t.session)
40+
@OneToMany(() => GameSessionPlayerEntity, (t) => t.session, { eager: true })
4141
players: Relation<GameSessionPlayerEntity>[];
4242

4343
constructor(

src/rest/info/info.controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class InfoController {
3535
@Get("game_sessions")
3636
public async gameSessions(): Promise<GameSessionDto[]> {
3737
return this.gameServerSessionModelRepository
38-
.find()
38+
.find({ relations: ['players'] })
3939
.then((t) => t.map(this.mapper.mapGameSession));
4040
}
4141

0 commit comments

Comments
 (0)