Took 1 hour 17 minutes
This commit is contained in:
2023-01-30 11:40:11 +01:00
parent 8f3e62f70e
commit 3e1d88a0e5
13 changed files with 92 additions and 41 deletions

View File

@ -28,6 +28,7 @@ export class WebSocketHandler {
try {
if (this.ws && this.ws.readyState == 1) {
log("Sending " + payload.event);
await this.ws.send(payload.toString());
resolve();
}
@ -38,7 +39,8 @@ export class WebSocketHandler {
}
public static answerRequest(type: RequestType, content: any) {
WebSocketHandler.send(new WebSocketPayload(WebSocketEvent.RESPONSE, {type: type, content: content}));
WebSocketHandler.send(new WebSocketPayload(WebSocketEvent.RESPONSE, {type: type, data: content}));
log("Answered " + type + " request");
}