X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fui-server%2FUIHttpServer.ts;h=85dbccdfe6ca5f79c10e360391f3b358f7aef871;hb=42b8cf5cdca8eaab1e7442f7c92c2a5ed97434f6;hp=ee12b3f4de996ed3a8f86b2a4db97949e9ebaf4e;hpb=4a3807d16c54137840a60af41877f3b21de12950;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ui-server/UIHttpServer.ts b/src/charging-station/ui-server/UIHttpServer.ts index ee12b3f4..85dbccdf 100644 --- a/src/charging-station/ui-server/UIHttpServer.ts +++ b/src/charging-station/ui-server/UIHttpServer.ts @@ -6,6 +6,7 @@ import { AbstractUIServer } from './AbstractUIServer'; import { UIServerUtils } from './UIServerUtils'; import { BaseError } from '../../exception'; import { + ApplicationProtocolVersion, type ProcedureName, type Protocol, type ProtocolRequest, @@ -43,9 +44,12 @@ export class UIHttpServer extends AbstractUIServer { this.startHttpServer(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public sendRequest(request: ProtocolRequest): void { - // This is intentionally left blank + switch (this.uiServerConfiguration.version) { + case ApplicationProtocolVersion.VERSION_20: + this.httpServer.emit('request', request); + break; + } } public sendResponse(response: ProtocolResponse): void { @@ -129,7 +133,7 @@ export class UIHttpServer extends AbstractUIServer { this.buildProtocolRequest( uuid, procedureName, - body ?? Constants.EMPTY_FREEZED_OBJECT, + body ?? Constants.EMPTY_FROZEN_OBJECT, ), ) .then((protocolResponse?: ProtocolResponse) => {