fix : set message event to use messageResponseDTO
This commit is contained in:
+8
-11
@@ -1,35 +1,32 @@
|
||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
||||
import type { MessageResponseDTO } from "./dto/messageresponse.dto";
|
||||
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||
|
||||
export class GameStartEvent {
|
||||
type = 'start';
|
||||
type = "start";
|
||||
constructor(public currentPlayer: PlayerResponseDTO) {
|
||||
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
export class GameDeleteEvent {
|
||||
type = 'delete';
|
||||
type = "delete";
|
||||
}
|
||||
|
||||
export class GameJoinEvent {
|
||||
type = 'joingame';
|
||||
type = "joingame";
|
||||
constructor(public player: PlayerResponseDTO) {
|
||||
this.player = new PlayerResponseDTO(player);
|
||||
}
|
||||
}
|
||||
|
||||
export class GameLeaveEvent {
|
||||
type = 'leavegame';
|
||||
type = "leavegame";
|
||||
constructor(public player: PlayerResponseDTO) {
|
||||
this.player = new PlayerResponseDTO(player);
|
||||
}
|
||||
}
|
||||
|
||||
export class GameMessageEvent {
|
||||
type = 'message';
|
||||
constructor(
|
||||
public gameId: number,
|
||||
public authorId: number,
|
||||
public message: string,
|
||||
) {}
|
||||
type = "message";
|
||||
constructor(public gameId: number, public message: MessageResponseDTO) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user