diff --git a/dto/messageresponse.dto.ts b/dto/messageresponse.dto.ts index e259204..f71af0b 100644 --- a/dto/messageresponse.dto.ts +++ b/dto/messageresponse.dto.ts @@ -2,10 +2,10 @@ export class MessageResponseDTO { constructor(partial: Partial) { this.id = partial.id; this.value = partial.value; - this.authorId = partial.authorId; + if (partial.authorId) this.authorId = partial.authorId; } id: number; value: string; - authorId: string; + authorId?: string; } diff --git a/dto/playerresponse.dto.ts b/dto/playerresponse.dto.ts index 169dc22..709dfd0 100644 --- a/dto/playerresponse.dto.ts +++ b/dto/playerresponse.dto.ts @@ -1,15 +1,14 @@ -import { UserResponseDTO } from './userresponse.dto'; - export class PlayerResponseDTO { constructor(partial: Partial) { this.score = partial.score; this.userId = partial.userId; this.id = partial.id; + this.hasGuessed = partial.hasGuessed; // this.user = new UserResponseDTO(partial.user); } id: number; userId: string; - score: number; + hasGuessed: boolean; }