feat : send only user ids
This commit is contained in:
@@ -6,7 +6,8 @@ export class GameResponseDTO {
|
||||
constructor(partial: Partial<GameResponseDTO>) {
|
||||
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[] = [];
|
||||
|
||||
|
||||
@@ -3,10 +3,13 @@ import { UserResponseDTO } from './userresponse.dto';
|
||||
export class PlayerResponseDTO {
|
||||
constructor(partial: Partial<PlayerResponseDTO>) {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user