aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-captions.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 09:26:50 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 09:26:50 +0100
commit0f6acda11681de90d38dd18669863c6e270851ee (patch)
treeb3b28e00d539645f5a810202dc8afada289e7b2e /server/helpers/custom-validators/video-captions.ts
parent9a18a6252071cf21b18f82a24bb63078abb75bc1 (diff)
downloadPeerTube-0f6acda11681de90d38dd18669863c6e270851ee.tar.gz
PeerTube-0f6acda11681de90d38dd18669863c6e270851ee.tar.zst
PeerTube-0f6acda11681de90d38dd18669863c6e270851ee.zip
Does exist
Diffstat (limited to 'server/helpers/custom-validators/video-captions.ts')
-rw-r--r--server/helpers/custom-validators/video-captions.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/video-captions.ts b/server/helpers/custom-validators/video-captions.ts
index b33d90e18..8bd139003 100644
--- a/server/helpers/custom-validators/video-captions.ts
+++ b/server/helpers/custom-validators/video-captions.ts
@@ -16,7 +16,7 @@ function isVideoCaptionFile (files: { [ fieldname: string ]: Express.Multer.File
16 return isFileValid(files, videoCaptionTypesRegex, field, CONSTRAINTS_FIELDS.VIDEO_CAPTIONS.CAPTION_FILE.FILE_SIZE.max) 16 return isFileValid(files, videoCaptionTypesRegex, field, CONSTRAINTS_FIELDS.VIDEO_CAPTIONS.CAPTION_FILE.FILE_SIZE.max)
17} 17}
18 18
19async function isVideoCaptionExist (video: VideoModel, language: string, res: Response) { 19async function doesVideoCaptionExist (video: VideoModel, language: string, res: Response) {
20 const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language) 20 const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language)
21 21
22 if (!videoCaption) { 22 if (!videoCaption) {
@@ -36,5 +36,5 @@ async function isVideoCaptionExist (video: VideoModel, language: string, res: Re
36export { 36export {
37 isVideoCaptionFile, 37 isVideoCaptionFile,
38 isVideoCaptionLanguageValid, 38 isVideoCaptionLanguageValid,
39 isVideoCaptionExist 39 doesVideoCaptionExist
40} 40}