From: Jérôme Benoit Date: Fri, 26 Aug 2022 22:04:52 +0000 (+0200) Subject: Fix http-status-codes import X-Git-Tag: v1.1.68~27 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a0202edcc580610fef591ce28554d87ed20faa1c;p=e-mobility-charging-stations-simulator.git Fix http-status-codes import Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ui-server/UIHttpServer.ts b/src/charging-station/ui-server/UIHttpServer.ts index 01c0f1b6..98a1a495 100644 --- a/src/charging-station/ui-server/UIHttpServer.ts +++ b/src/charging-station/ui-server/UIHttpServer.ts @@ -1,6 +1,6 @@ import { IncomingMessage, RequestListener, Server, ServerResponse } from 'http'; -import StatusCodes from 'http-status-codes'; +import { StatusCodes } from 'http-status-codes'; import BaseError from '../../exception/BaseError'; import { ServerOptions } from '../../types/ConfigurationData'; @@ -48,7 +48,7 @@ export default class UIHttpServer extends AbstractUIServer { public sendResponse(response: string): void { const [uuid, payload] = JSON.parse(response) as ProtocolResponse; - let statusCode: number; + let statusCode: StatusCodes; switch (payload.status) { case ResponseStatus.SUCCESS: statusCode = StatusCodes.OK;