diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-12 11:05:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-16 10:33:27 +0200 |
commit | 0e6cd1c00f71554fe7375a96db693a6983951ba6 (patch) | |
tree | be9b049e047895c88c561202377f6c5e64ae40df /server/middlewares/validators | |
parent | 045224d5eb6a41081186c4040bab1570b9d9ad65 (diff) | |
download | PeerTube-0e6cd1c00f71554fe7375a96db693a6983951ba6.tar.gz PeerTube-0e6cd1c00f71554fe7375a96db693a6983951ba6.tar.zst PeerTube-0e6cd1c00f71554fe7375a96db693a6983951ba6.zip |
Add ability to list comments on local videos
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos/video-comments.ts | 6 |
1 files changed, 6 insertions, 0 deletions
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 = [ | |||
24 | .custom(isBooleanValid) | 24 | .custom(isBooleanValid) |
25 | .withMessage('Should have a valid is local boolean'), | 25 | .withMessage('Should have a valid is local boolean'), |
26 | 26 | ||
27 | query('onLocalVideo') | ||
28 | .optional() | ||
29 | .customSanitizer(toBooleanOrNull) | ||
30 | .custom(isBooleanValid) | ||
31 | .withMessage('Should have a valid is on local video boolean'), | ||
32 | |||
27 | query('search') | 33 | query('search') |
28 | .optional() | 34 | .optional() |
29 | .custom(exists).withMessage('Should have a valid search'), | 35 | .custom(exists).withMessage('Should have a valid search'), |