aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 14:27:04 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 14:27:04 +0200
commit396f6f0140b0f76162e2378fd5a61e2f888673ed (patch)
treea5bd668bfc7dca7f311b9fc42ebb8bd01f462648 /server/middlewares/validators/shared
parent97eba003a9d0adcb0cab9190f566327b1417c7d3 (diff)
downloadPeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.gz
PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.zst
PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.zip
Cleanup useless express validator messages
Diffstat (limited to 'server/middlewares/validators/shared')
-rw-r--r--server/middlewares/validators/shared/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/shared/utils.ts b/server/middlewares/validators/shared/utils.ts
index 410de4d80..77b64bc7a 100644
--- a/server/middlewares/validators/shared/utils.ts
+++ b/server/middlewares/validators/shared/utils.ts
@@ -26,13 +26,13 @@ function areValidationErrors (req: express.Request, res: express.Response) {
26function isValidVideoIdParam (paramName: string) { 26function isValidVideoIdParam (paramName: string) {
27 return param(paramName) 27 return param(paramName)
28 .customSanitizer(toCompleteUUID) 28 .customSanitizer(toCompleteUUID)
29 .custom(isIdOrUUIDValid).withMessage('Should have a valid video id') 29 .custom(isIdOrUUIDValid).withMessage('Should have a valid video id (id, short UUID or UUID)')
30} 30}
31 31
32function isValidPlaylistIdParam (paramName: string) { 32function isValidPlaylistIdParam (paramName: string) {
33 return param(paramName) 33 return param(paramName)
34 .customSanitizer(toCompleteUUID) 34 .customSanitizer(toCompleteUUID)
35 .custom(isIdOrUUIDValid).withMessage('Should have a valid playlist id') 35 .custom(isIdOrUUIDValid).withMessage('Should have a valid playlist id (id, short UUID or UUID)')
36} 36}
37 37
38// --------------------------------------------------------------------------- 38// ---------------------------------------------------------------------------