Fix tests
[oweals/peertube.git] / server / middlewares / servers.ts
index eaf9aa144a7806b9532b8356d1375543e9c1ec50..488f9c36848dab2c6c97925a7da525032ecacfd8 100644 (file)
@@ -20,26 +20,10 @@ function setBodyHostsPort (req: express.Request, res: express.Response, next: ex
   return next()
 }
 
-function setBodyHostPort (req: express.Request, res: express.Response, next: express.NextFunction) {
-  if (!req.body.host) return next()
-
-  const hostWithPort = getHostWithPort(req.body.host)
-
-  // Problem with the url parsing?
-  if (hostWithPort === null) {
-    return res.sendStatus(500)
-  }
-
-  req.body.host = hostWithPort
-
-  return next()
-}
-
 // ---------------------------------------------------------------------------
 
 export {
-  setBodyHostsPort,
-  setBodyHostPort
+  setBodyHostsPort
 }
 
 // ---------------------------------------------------------------------------