aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/video-stats.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos/video-stats.ts b/server/middlewares/validators/videos/video-stats.ts
index 12509abde..f17fbcc09 100644
--- a/server/middlewares/validators/videos/video-stats.ts
+++ b/server/middlewares/validators/videos/video-stats.ts
@@ -10,6 +10,16 @@ import { areValidationErrors, checkUserCanManageVideo, doesVideoExist, isValidVi
10const videoOverallStatsValidator = [ 10const videoOverallStatsValidator = [
11 isValidVideoIdParam('videoId'), 11 isValidVideoIdParam('videoId'),
12 12
13 query('startDate')
14 .optional()
15 .custom(isDateValid)
16 .withMessage('Should have a valid start date'),
17
18 query('endDate')
19 .optional()
20 .custom(isDateValid)
21 .withMessage('Should have a valid end date'),
22
13 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 23 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
14 logger.debug('Checking videoOverallStatsValidator parameters', { parameters: req.body }) 24 logger.debug('Checking videoOverallStatsValidator parameters', { parameters: req.body })
15 25