stuff
This commit is contained in:
parent
d6471d60c4
commit
ef5aa469d5
2 changed files with 6 additions and 1 deletions
|
|
@ -160,6 +160,11 @@ export class GameGateway implements OnGatewayConnection, OnGatewayDisconnect, On
|
|||
}
|
||||
|
||||
private async handleRevealAnswerAction(payload: PlayerAction, room: any) {
|
||||
if (!payload.questionId || !payload.answerId) {
|
||||
console.error('Missing questionId or answerId in payload');
|
||||
return;
|
||||
}
|
||||
|
||||
const questions = room.roomPack?.questions as any[] || [];
|
||||
const question = questions.find(q => q.id === payload.questionId);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export class VoiceService {
|
|||
throw new NotFoundException('Questions not found for this room');
|
||||
}
|
||||
|
||||
const question = (questions as Question[]).find((q) => q.id === questionId);
|
||||
const question = (questions as unknown as Question[]).find((q) => q.id === questionId);
|
||||
|
||||
if (!question) {
|
||||
this.logger.error(`Question with id=${questionId} not found in room=${roomId}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue