diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:33:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:45:08 +0100 |
commit | ba5a8d89bbf049e4afc41543bcc072cccdb02669 (patch) | |
tree | 6cc6b2dca17745cc0824c7ad4515f3bc4883fa4a /server/middlewares/validators/videos/videos.ts | |
parent | 29f148a61381727a432c22a71c7a2b7cc23d9c9e (diff) | |
download | PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.gz PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.zst PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.zip |
Update server dependencies
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 84e309bec..26a671a1e 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -2,8 +2,10 @@ import * as express from 'express' | |||
2 | import { body, param, query, ValidationChain } from 'express-validator' | 2 | import { body, param, query, ValidationChain } from 'express-validator' |
3 | import { isAbleToUploadVideo } from '@server/lib/user' | 3 | import { isAbleToUploadVideo } from '@server/lib/user' |
4 | import { getServerActor } from '@server/models/application/application' | 4 | import { getServerActor } from '@server/models/application/application' |
5 | import { ExpressPromiseHandler } from '@server/types/express' | ||
5 | import { MVideoFullLight } from '@server/types/models' | 6 | import { MVideoFullLight } from '@server/types/models' |
6 | import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' | 7 | import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' |
8 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
7 | import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/video-change-ownership-accept.model' | 9 | import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/video-change-ownership-accept.model' |
8 | import { | 10 | import { |
9 | exists, | 11 | exists, |
@@ -54,7 +56,6 @@ import { AccountModel } from '../../../models/account/account' | |||
54 | import { VideoModel } from '../../../models/video/video' | 56 | import { VideoModel } from '../../../models/video/video' |
55 | import { authenticatePromiseIfNeeded } from '../../oauth' | 57 | import { authenticatePromiseIfNeeded } from '../../oauth' |
56 | import { areValidationErrors } from '../utils' | 58 | import { areValidationErrors } from '../utils' |
57 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
58 | 59 | ||
59 | const videosAddValidator = getCommonVideoEditAttributes().concat([ | 60 | const videosAddValidator = getCommonVideoEditAttributes().concat([ |
60 | body('videofile') | 61 | body('videofile') |
@@ -411,7 +412,7 @@ function getCommonVideoEditAttributes () { | |||
411 | .optional() | 412 | .optional() |
412 | .customSanitizer(toIntOrNull) | 413 | .customSanitizer(toIntOrNull) |
413 | .custom(isScheduleVideoUpdatePrivacyValid).withMessage('Should have correct schedule update privacy') | 414 | .custom(isScheduleVideoUpdatePrivacyValid).withMessage('Should have correct schedule update privacy') |
414 | ] as (ValidationChain | express.Handler)[] | 415 | ] as (ValidationChain | ExpressPromiseHandler)[] |
415 | } | 416 | } |
416 | 417 | ||
417 | const commonVideosFiltersValidator = [ | 418 | const commonVideosFiltersValidator = [ |