repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: silence linter
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ui-server
/
UIHttpServer.ts
diff --git
a/src/charging-station/ui-server/UIHttpServer.ts
b/src/charging-station/ui-server/UIHttpServer.ts
index 27b9e8458fbe19bd1e3822f60f57fea7d9c84645..eb3550830682f45cff76aff8559df71b34e855f5 100644
(file)
--- a/
src/charging-station/ui-server/UIHttpServer.ts
+++ b/
src/charging-station/ui-server/UIHttpServer.ts
@@
-24,7
+24,7
@@
enum HttpMethods {
GET = 'GET',
PUT = 'PUT',
POST = 'POST',
GET = 'GET',
PUT = 'PUT',
POST = 'POST',
- PATCH = 'PATCH'
,
+ PATCH = 'PATCH'
}
export class UIHttpServer extends AbstractUIServer {
}
export class UIHttpServer extends AbstractUIServer {
@@
-80,7
+80,7
@@
export class UIHttpServer extends AbstractUIServer {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
- this.authenticate(req,
(err)
=> {
+ this.authenticate(req,
err
=> {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
@@
-96,7
+96,7
@@
export class UIHttpServer extends AbstractUIServer {
const [protocol, version, procedureName] = req.url?.split('/').slice(1) as [
Protocol,
ProtocolVersion,
const [protocol, version, procedureName] = req.url?.split('/').slice(1) as [
Protocol,
ProtocolVersion,
- ProcedureName
,
+ ProcedureName
]
const uuid = generateUUID()
this.responseHandlers.set(uuid, res)
]
const uuid = generateUUID()
this.responseHandlers.set(uuid, res)
@@
-106,7
+106,7
@@
export class UIHttpServer extends AbstractUIServer {
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
- req.on('error',
(error)
=> {
+ req.on('error',
error
=> {
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error