diff --git a/dto/gameresponse.dto.ts b/dto/gameresponse.dto.ts index ff92aee..38748e3 100644 --- a/dto/gameresponse.dto.ts +++ b/dto/gameresponse.dto.ts @@ -6,7 +6,8 @@ export class GameResponseDTO { constructor(partial: Partial) { this.id = partial.id; this.started = partial.started; - this.owner = new UserResponseDTO(partial.owner); + this.ownerId = partial.ownerId; + // this.owner = new UserResponseDTO(partial.owner); if (partial.players) { this.players = partial.players.map((p) => new PlayerResponseDTO(p)); } @@ -24,7 +25,7 @@ export class GameResponseDTO { id: number; - owner: UserResponseDTO; + ownerId: number; players: PlayerResponseDTO[] = []; diff --git a/dto/playerresponse.dto.ts b/dto/playerresponse.dto.ts index fdebc6b..b2d4110 100644 --- a/dto/playerresponse.dto.ts +++ b/dto/playerresponse.dto.ts @@ -3,10 +3,13 @@ import { UserResponseDTO } from './userresponse.dto'; export class PlayerResponseDTO { constructor(partial: Partial) { this.score = partial.score; - this.user = new UserResponseDTO(partial.user); + this.userId = partial.userId; + this.id = partial.id; + // this.user = new UserResponseDTO(partial.user); } - user: UserResponseDTO; + id: number; + userId: number; score: number; }