Fix Json type definition naming
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-websocket-services / UIService001.ts
index 3270aaf30d7ee84bbc46438a4b478d29f8f858ae..82bafd78f246c59f7b53d8f571d53223b273ac4b 100644 (file)
@@ -1,15 +1,22 @@
 import { ProtocolCommand, ProtocolRequestHandler } from '../../types/UIProtocol';
 
 import AbstractUIService from './AbstractUIService';
+import { JsonObject } from '../../types/JsonType';
 import UIWebSocketServer from '../UIWebSocketServer';
 
 export default class UIService001 extends AbstractUIService {
   constructor(uiWebSocketServer: UIWebSocketServer) {
     super(uiWebSocketServer);
-    this.messageHandlers.set(ProtocolCommand.START_TRANSACTION, this.handleStartTransaction.bind(this) as ProtocolRequestHandler);
-    this.messageHandlers.set(ProtocolCommand.STOP_TRANSACTION, this.handleStopTransaction.bind(this) as ProtocolRequestHandler);
+    this.messageHandlers.set(
+      ProtocolCommand.START_TRANSACTION,
+      this.handleStartTransaction.bind(this) as ProtocolRequestHandler
+    );
+    this.messageHandlers.set(
+      ProtocolCommand.STOP_TRANSACTION,
+      this.handleStopTransaction.bind(this) as ProtocolRequestHandler
+    );
   }
 
-  private handleStartTransaction(payload: Record<string, unknown>): void { }
-  private handleStopTransaction(payload: Record<string, unknown>): void { }
+  private handleStartTransaction(payload: JsonObject): void {}
+  private handleStopTransaction(payload: JsonObject): void {}
 }