From 69818c9394366b954b6ba3bd697bd9d2b09f2a16 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 10 Jun 2017 22:15:25 +0200 Subject: Type functions --- server/middlewares/validators/remote/videos.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/middlewares/validators/remote/videos.ts') diff --git a/server/middlewares/validators/remote/videos.ts b/server/middlewares/validators/remote/videos.ts index 3380c29e2..2037c0085 100644 --- a/server/middlewares/validators/remote/videos.ts +++ b/server/middlewares/validators/remote/videos.ts @@ -1,7 +1,10 @@ +import 'express-validator' +import * as express from 'express' + import { logger } from '../../../helpers' import { checkErrors } from '../utils' -function remoteVideosValidator (req, res, next) { +function remoteVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) { req.checkBody('data').isEachRemoteRequestVideosValid() logger.debug('Checking remoteVideos parameters', { parameters: req.body }) @@ -9,7 +12,7 @@ function remoteVideosValidator (req, res, next) { checkErrors(req, res, next) } -function remoteQaduVideosValidator (req, res, next) { +function remoteQaduVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) { req.checkBody('data').isEachRemoteRequestVideosQaduValid() logger.debug('Checking remoteQaduVideos parameters', { parameters: req.body }) @@ -17,7 +20,7 @@ function remoteQaduVideosValidator (req, res, next) { checkErrors(req, res, next) } -function remoteEventsVideosValidator (req, res, next) { +function remoteEventsVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) { req.checkBody('data').isEachRemoteRequestVideosEventsValid() logger.debug('Checking remoteEventsVideos parameters', { parameters: req.body }) -- cgit v1.2.3