]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/activitypub/signature.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / activitypub / signature.ts
index 642bcefe0dc1c17f9bb9dbee542baf600a0f8967..8c133ecef24a4b26772032afb263839eaa9dc945 100644 (file)
@@ -12,16 +12,16 @@ import { areValidationErrors } from '../shared'
 const signatureValidator = [
   body('signature.type')
     .optional()
-    .custom(isSignatureTypeValid).withMessage('Should have a valid signature type'),
+    .custom(isSignatureTypeValid),
   body('signature.created')
     .optional()
     .custom(isDateValid).withMessage('Should have a signature created date that conforms to ISO 8601'),
   body('signature.creator')
     .optional()
-    .custom(isSignatureCreatorValid).withMessage('Should have a valid signature creator'),
+    .custom(isSignatureCreatorValid),
   body('signature.signatureValue')
     .optional()
-    .custom(isSignatureValueValid).withMessage('Should have a valid signature value'),
+    .custom(isSignatureValueValid),
 
   (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking Linked Data Signature parameter', { parameters: { signature: req.body.signature } })