diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 09:26:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 09:26:50 +0100 |
commit | 0f6acda11681de90d38dd18669863c6e270851ee (patch) | |
tree | b3b28e00d539645f5a810202dc8afada289e7b2e /server/helpers/custom-validators/video-captions.ts | |
parent | 9a18a6252071cf21b18f82a24bb63078abb75bc1 (diff) | |
download | PeerTube-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.ts | 4 |
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 | ||
19 | async function isVideoCaptionExist (video: VideoModel, language: string, res: Response) { | 19 | async 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 | |||
36 | export { | 36 | export { |
37 | isVideoCaptionFile, | 37 | isVideoCaptionFile, |
38 | isVideoCaptionLanguageValid, | 38 | isVideoCaptionLanguageValid, |
39 | isVideoCaptionExist | 39 | doesVideoCaptionExist |
40 | } | 40 | } |