X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fvideos%2Fvideo-captions.ts;h=2295e049afe9376b665411951d0a11959a0e506d;hb=10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4;hp=872d9c2aba9b8b2a5dee5b85be90f06e14ecbe42;hpb=5e08989ede1a340b9edb94465a11b1e04bf24094;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index 872d9c2ab..2295e049a 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts @@ -1,13 +1,12 @@ import * as express from 'express' -import { areValidationErrors } from '../utils' -import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' import { body, param } from 'express-validator' -import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' import { UserRight } from '../../../../shared' -import { logger } from '../../../helpers/logger' +import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' import { cleanUpReqFiles } from '../../../helpers/express-utils' -import { checkUserCanManageVideo, doesVideoCaptionExist, doesVideoExist } from '../../../helpers/middlewares' +import { logger } from '../../../helpers/logger' +import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' +import { areValidationErrors, checkUserCanManageVideo, doesVideoCaptionExist, doesVideoExist } from '../shared' const addVideoCaptionValidator = [ param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'),