Skip to content

Commit

Permalink
chore(refactor): added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed May 5, 2024
1 parent 86ab1e0 commit f6e6f94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game-source-redux/src/lib/websockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export default class KubeWebSocket {
this.ws.onmessage = this.onMessage.bind(this);
this.ws.onclose = this.onClose.bind(this);
this.ws.onerror = this.onError.bind(this);
this.ws.onopen = this.onopen.bind(this)
this.ws.onopen = this.onOpen.bind(this);
}

private onMessage(event: MessageEvent) {
console.log(event.data);
const data: string = event.data;
console.log(`Received: ${data}`);
const eventData: PlayerInfo = JSON.parse(data) as PlayerInfo;

const action = eventData.action;
Expand Down Expand Up @@ -70,7 +70,7 @@ export default class KubeWebSocket {
this.ws.send(data);
}

private onopen() {
private onOpen() {
const data: PlayerInfo = {
initialised: false,
player: {
Expand Down

0 comments on commit f6e6f94

Please sign in to comment.