diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
commit | 396f6f0140b0f76162e2378fd5a61e2f888673ed (patch) | |
tree | a5bd668bfc7dca7f311b9fc42ebb8bd01f462648 /server/middlewares/validators/shared | |
parent | 97eba003a9d0adcb0cab9190f566327b1417c7d3 (diff) | |
download | PeerTube-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.ts | 4 |
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) { | |||
26 | function isValidVideoIdParam (paramName: string) { | 26 | function 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 | ||
32 | function isValidPlaylistIdParam (paramName: string) { | 32 | function 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 | // --------------------------------------------------------------------------- |