]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-shares.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-shares.ts
index 3b8d6176801dbb4497fb3f38c19b5699297f9793..40337dcf11d71612d4d9e16ac4212cc0f729e52c 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import { param } from 'express-validator'
 import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
 import { isIdValid } from '../../../helpers/custom-validators/misc'
@@ -10,7 +10,7 @@ const videosShareValidator = [
   isValidVideoIdParam('id'),
 
   param('actorId')
-    .custom(isIdValid).not().isEmpty().withMessage('Should have a valid actor id'),
+    .custom(isIdValid),
 
   async (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking videoShare parameters', { parameters: req.params })