mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 12:22:54 +00:00 
			
		
		
		
	Rename WebSocketService sendJSON() -> send()
This commit is contained in:
		@@ -42,7 +42,7 @@ export class ConsoleComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  sendContent(content: string) {
 | 
			
		||||
    this.webSocketService.sendJSON({
 | 
			
		||||
    this.webSocketService.send({
 | 
			
		||||
      'key': 'console.content',
 | 
			
		||||
      'value': content
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -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'}));
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ export class WebSocketService {
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public sendJSON(json: any) {
 | 
			
		||||
  public send(json: any) {
 | 
			
		||||
    this.ws.next(json);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,6 @@ export class TestmessengerComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  sendTestMessage() {
 | 
			
		||||
    const jsonObject = JSON.parse(this.messageStr);
 | 
			
		||||
    this.webSocketService.sendJSON(jsonObject);
 | 
			
		||||
    this.webSocketService.send(jsonObject);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user