]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/utils.ts
Remove ng2-completer
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / utils.ts
index 710e65529684d5633a03fb630da7d7ab00328818..0424d59429f6e914fa7f855db71afcb1af4519cb 100644 (file)
@@ -1,9 +1,10 @@
+import 'express-validator'
+import * as express from 'express'
 import { inspect } from 'util'
 
 import { logger } from '../../helpers'
 
-function checkErrors (req, res, next, statusCode?) {
-  if (statusCode === undefined) statusCode = 400
+function checkErrors (req: express.Request, res: express.Response, next: express.NextFunction, statusCode = 400) {
   const errors = req.validationErrors()
 
   if (errors) {