]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/video-captions.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-captions.ts
index b33d90e1856f5bc3a77683f2c8d321ec4b763dfa..3b6569a8ae757f8ff71f341b214eaa5a496c73a0 100644 (file)
@@ -1,4 +1,4 @@
-import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_LANGUAGES } from '../../initializers'
+import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_LANGUAGES } from '../../initializers/constants'
 import { exists, isFileValid } from './misc'
 import { Response } from 'express'
 import { VideoModel } from '../../models/video/video'
@@ -16,7 +16,7 @@ function isVideoCaptionFile (files: { [ fieldname: string ]: Express.Multer.File
   return isFileValid(files, videoCaptionTypesRegex, field, CONSTRAINTS_FIELDS.VIDEO_CAPTIONS.CAPTION_FILE.FILE_SIZE.max)
 }
 
-async function isVideoCaptionExist (video: VideoModel, language: string, res: Response) {
+async function doesVideoCaptionExist (video: VideoModel, language: string, res: Response) {
   const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language)
 
   if (!videoCaption) {
@@ -36,5 +36,5 @@ async function isVideoCaptionExist (video: VideoModel, language: string, res: Re
 export {
   isVideoCaptionFile,
   isVideoCaptionLanguageValid,
-  isVideoCaptionExist
+  doesVideoCaptionExist
 }