From 0e6cd1c00f71554fe7375a96db693a6983951ba6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Aug 2022 11:05:11 +0200 Subject: Add ability to list comments on local videos --- server/middlewares/validators/videos/video-comments.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/middlewares/validators/videos/video-comments.ts') diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index b22a4e3b7..68f41e50e 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts @@ -24,6 +24,12 @@ const listVideoCommentsValidator = [ .custom(isBooleanValid) .withMessage('Should have a valid is local boolean'), + query('onLocalVideo') + .optional() + .customSanitizer(toBooleanOrNull) + .custom(isBooleanValid) + .withMessage('Should have a valid is on local video boolean'), + query('search') .optional() .custom(exists).withMessage('Should have a valid search'), -- cgit v1.2.3