Rename WebSocketService sendJSON() -> send()

This commit is contained in:
Kristóf Tóth 2019-08-15 21:24:54 +02:00
parent 614019fbff
commit 24c994c41e
6 changed files with 7 additions and 7 deletions

View File

@ -42,7 +42,7 @@ export class ConsoleComponent implements OnInit {
}
sendContent(content: string) {
this.webSocketService.sendJSON({
this.webSocketService.send({
'key': 'console.content',
'value': content
});

View File

@ -72,7 +72,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
sendReadyIfNeeded() {
if (config.dashboard.sendReadyAfterPageReload) {
setTimeout(() => this.webSocketService.sendJSON({'key': 'frontend.ready'}));
setTimeout(() => this.webSocketService.send({'key': 'frontend.ready'}));
}
}

View File

@ -183,7 +183,7 @@ export class IdeComponent implements OnInit {
}
sendCodeContents() {
this.webSocketService.sendJSON({
this.webSocketService.send({
'key': 'ide.write',
'filename': this.filename,
'content': this.code
@ -191,7 +191,7 @@ export class IdeComponent implements OnInit {
}
requestCode() {
this.webSocketService.sendJSON({
this.webSocketService.send({
'key': 'ide.read',
'filename': this.filename
});

View File

@ -44,7 +44,7 @@ export class ProcessManagerService {
}
sendCommand(command: string, process_name: string) {
this.webSocketService.sendJSON({
this.webSocketService.send({
'key': 'process.' + command,
'name': process_name
});

View File

@ -26,7 +26,7 @@ export class WebSocketService {
);
}
public sendJSON(json: any) {
public send(json: any) {
this.ws.next(json);
}
}

View File

@ -18,6 +18,6 @@ export class TestmessengerComponent implements OnInit {
sendTestMessage() {
const jsonObject = JSON.parse(this.messageStr);
this.webSocketService.sendJSON(jsonObject);
this.webSocketService.send(jsonObject);
}
}