aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-channels.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/video-channels.ts')
-rw-r--r--server/helpers/custom-validators/video-channels.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts
index 3792bbdcc..fad7a9bcf 100644
--- a/server/helpers/custom-validators/video-channels.ts
+++ b/server/helpers/custom-validators/video-channels.ts
@@ -20,13 +20,13 @@ function isVideoChannelSupportValid (value: string) {
20 return value === null || (exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.SUPPORT)) 20 return value === null || (exists(value) && validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.SUPPORT))
21} 21}
22 22
23async function isLocalVideoChannelNameExist (name: string, res: express.Response) { 23async function doesLocalVideoChannelNameExist (name: string, res: express.Response) {
24 const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) 24 const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name)
25 25
26 return processVideoChannelExist(videoChannel, res) 26 return processVideoChannelExist(videoChannel, res)
27} 27}
28 28
29async function isVideoChannelIdExist (id: number | string, res: express.Response) { 29async function doesVideoChannelIdExist (id: number | string, res: express.Response) {
30 let videoChannel: VideoChannelModel 30 let videoChannel: VideoChannelModel
31 if (validator.isInt('' + id)) { 31 if (validator.isInt('' + id)) {
32 videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) 32 videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id)
@@ -37,7 +37,7 @@ async function isVideoChannelIdExist (id: number | string, res: express.Response
37 return processVideoChannelExist(videoChannel, res) 37 return processVideoChannelExist(videoChannel, res)
38} 38}
39 39
40async function isVideoChannelNameWithHostExist (nameWithDomain: string, res: express.Response) { 40async function doesVideoChannelNameWithHostExist (nameWithDomain: string, res: express.Response) {
41 const videoChannel = await VideoChannelModel.loadByNameWithHostAndPopulateAccount(nameWithDomain) 41 const videoChannel = await VideoChannelModel.loadByNameWithHostAndPopulateAccount(nameWithDomain)
42 42
43 return processVideoChannelExist(videoChannel, res) 43 return processVideoChannelExist(videoChannel, res)
@@ -46,12 +46,12 @@ async function isVideoChannelNameWithHostExist (nameWithDomain: string, res: exp
46// --------------------------------------------------------------------------- 46// ---------------------------------------------------------------------------
47 47
48export { 48export {
49 isVideoChannelNameWithHostExist, 49 doesVideoChannelNameWithHostExist,
50 isLocalVideoChannelNameExist, 50 doesLocalVideoChannelNameExist,
51 isVideoChannelDescriptionValid, 51 isVideoChannelDescriptionValid,
52 isVideoChannelNameValid, 52 isVideoChannelNameValid,
53 isVideoChannelSupportValid, 53 isVideoChannelSupportValid,
54 isVideoChannelIdExist 54 doesVideoChannelIdExist
55} 55}
56 56
57function processVideoChannelExist (videoChannel: VideoChannelModel, res: express.Response) { 57function processVideoChannelExist (videoChannel: VideoChannelModel, res: express.Response) {