BIG WIP of refactoring my work in TS
This commit is contained in:
@@ -2,8 +2,7 @@ export class Message {
|
||||
userId: string;
|
||||
roomId: string;
|
||||
|
||||
constructor(message: string) {
|
||||
let data = JSON.parse(message);
|
||||
constructor(data: any) {
|
||||
if(!data.userId || !data.roomId){
|
||||
throw Error("userId or roomId cannot be null");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user