aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/servers.ts')
-rw-r--r--server/middlewares/servers.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/servers.ts b/server/middlewares/servers.ts
index 9c0af443a..5e1c165f0 100644
--- a/server/middlewares/servers.ts
+++ b/server/middlewares/servers.ts
@@ -1,5 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import { getHostWithPort } from '../helpers/express-utils' 2import { getHostWithPort } from '../helpers/express-utils'
3import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes'
3 4
4function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) { 5function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) {
5 if (!req.body.hosts) return next() 6 if (!req.body.hosts) return next()
@@ -9,7 +10,7 @@ function setBodyHostsPort (req: express.Request, res: express.Response, next: ex
9 10
10 // Problem with the url parsing? 11 // Problem with the url parsing?
11 if (hostWithPort === null) { 12 if (hostWithPort === null) {
12 return res.sendStatus(500) 13 return res.sendStatus(HttpStatusCode.INTERNAL_SERVER_ERROR_500)
13 } 14 }
14 15
15 req.body.hosts[i] = hostWithPort 16 req.body.hosts[i] = hostWithPort