From c1a22098f74eaa48aac2885ca7602db1cb018b72 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Mon, 30 Dec 2024 18:36:56 +0100 Subject: [PATCH] add player hasGuessed --- dto/messageresponse.dto.ts | 4 ++-- dto/playerresponse.dto.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) 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; }