]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-shares.ts
Translated using Weblate (Persian)
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-shares.ts
index 7e54b6fc0f6237d6a018083e2e9d2e9d52d3a4d4..c234de6ed53dfff68b1b3e69af101a19c6cc9d63 100644 (file)
@@ -1,8 +1,7 @@
-import * as express from 'express'
+import express from 'express'
 import { param } from 'express-validator'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
+import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
 import { isIdValid } from '../../../helpers/custom-validators/misc'
-import { logger } from '../../../helpers/logger'
 import { VideoShareModel } from '../../../models/video/video-share'
 import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from '../shared'
 
@@ -10,11 +9,9 @@ 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 })
-
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.id, res)) return