aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index d00d24c4c..dd9d62d24 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -165,7 +165,7 @@ function checkUserCanManageVideo (user: UserModel, video: VideoModel, right: Use
165 return true 165 return true
166} 166}
167 167
168async function isVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { 168async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') {
169 const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined 169 const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined
170 170
171 const video = await fetchVideo(id, fetchType, userId) 171 const video = await fetchVideo(id, fetchType, userId)
@@ -182,7 +182,7 @@ async function isVideoExist (id: number | string, res: Response, fetchType: Vide
182 return true 182 return true
183} 183}
184 184
185async function isVideoChannelOfAccountExist (channelId: number, user: UserModel, res: Response) { 185async function doesVideoChannelOfAccountExist (channelId: number, user: UserModel, res: Response) {
186 if (user.hasRight(UserRight.UPDATE_ANY_VIDEO) === true) { 186 if (user.hasRight(UserRight.UPDATE_ANY_VIDEO) === true) {
187 const videoChannel = await VideoChannelModel.loadAndPopulateAccount(channelId) 187 const videoChannel = await VideoChannelModel.loadAndPopulateAccount(channelId)
188 if (videoChannel === null) { 188 if (videoChannel === null) {
@@ -236,9 +236,9 @@ export {
236 isVideoPrivacyValid, 236 isVideoPrivacyValid,
237 isVideoFileResolutionValid, 237 isVideoFileResolutionValid,
238 isVideoFileSizeValid, 238 isVideoFileSizeValid,
239 isVideoExist, 239 doesVideoExist,
240 isVideoImage, 240 isVideoImage,
241 isVideoChannelOfAccountExist, 241 doesVideoChannelOfAccountExist,
242 isVideoSupportValid, 242 isVideoSupportValid,
243 isVideoFilterValid 243 isVideoFilterValid
244} 244}