Does exist

This commit is contained in:
Chocobozzz 2019-03-19 09:26:50 +01:00
parent 9a18a62520
commit 0f6acda116
No known key found for this signature in database
GPG key ID: 583A612D890159BE
28 changed files with 132 additions and 133 deletions

View file

@ -165,7 +165,7 @@ function checkUserCanManageVideo (user: UserModel, video: VideoModel, right: Use
return true
}
async function isVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') {
async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') {
const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined
const video = await fetchVideo(id, fetchType, userId)
@ -182,7 +182,7 @@ async function isVideoExist (id: number | string, res: Response, fetchType: Vide
return true
}
async function isVideoChannelOfAccountExist (channelId: number, user: UserModel, res: Response) {
async function doesVideoChannelOfAccountExist (channelId: number, user: UserModel, res: Response) {
if (user.hasRight(UserRight.UPDATE_ANY_VIDEO) === true) {
const videoChannel = await VideoChannelModel.loadAndPopulateAccount(channelId)
if (videoChannel === null) {
@ -236,9 +236,9 @@ export {
isVideoPrivacyValid,
isVideoFileResolutionValid,
isVideoFileSizeValid,
isVideoExist,
doesVideoExist,
isVideoImage,
isVideoChannelOfAccountExist,
doesVideoChannelOfAccountExist,
isVideoSupportValid,
isVideoFilterValid
}