aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/video-playlists.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts
index 796c63748..fa26e2336 100644
--- a/server/middlewares/validators/videos/video-playlists.ts
+++ b/server/middlewares/validators/videos/video-playlists.ts
@@ -45,7 +45,7 @@ const videoPlaylistsUpdateValidator = getCommonPlaylistEditAttributes().concat([
45 45
46 if (areValidationErrors(req, res)) return cleanUpReqFiles(req) 46 if (areValidationErrors(req, res)) return cleanUpReqFiles(req)
47 47
48 if (!await isVideoPlaylistExist(req.params.playlistId, res)) return cleanUpReqFiles(req) 48 if (!await isVideoPlaylistExist(req.params.playlistId, res, 'all')) return cleanUpReqFiles(req)
49 49
50 const videoPlaylist = res.locals.videoPlaylist 50 const videoPlaylist = res.locals.videoPlaylist
51 51
@@ -153,7 +153,7 @@ const videoPlaylistsAddVideoValidator = [
153 153
154 if (areValidationErrors(req, res)) return 154 if (areValidationErrors(req, res)) return
155 155
156 if (!await isVideoPlaylistExist(req.params.playlistId, res)) return 156 if (!await isVideoPlaylistExist(req.params.playlistId, res, 'all')) return
157 if (!await isVideoExist(req.body.videoId, res, 'only-video')) return 157 if (!await isVideoExist(req.body.videoId, res, 'only-video')) return
158 158
159 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist 159 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist
@@ -193,7 +193,7 @@ const videoPlaylistsUpdateOrRemoveVideoValidator = [
193 193
194 if (areValidationErrors(req, res)) return 194 if (areValidationErrors(req, res)) return
195 195
196 if (!await isVideoPlaylistExist(req.params.playlistId, res)) return 196 if (!await isVideoPlaylistExist(req.params.playlistId, res, 'all')) return
197 if (!await isVideoExist(req.params.videoId, res, 'id')) return 197 if (!await isVideoExist(req.params.videoId, res, 'id')) return
198 198
199 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist 199 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist
@@ -261,7 +261,7 @@ const videoPlaylistsReorderVideosValidator = [
261 261
262 if (areValidationErrors(req, res)) return 262 if (areValidationErrors(req, res)) return
263 263
264 if (!await isVideoPlaylistExist(req.params.playlistId, res)) return 264 if (!await isVideoPlaylistExist(req.params.playlistId, res, 'all')) return
265 265
266 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist 266 const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist
267 if (!checkUserCanManageVideoPlaylist(res.locals.oauth.token.User, videoPlaylist, UserRight.UPDATE_ANY_VIDEO_PLAYLIST, res)) return 267 if (!checkUserCanManageVideoPlaylist(res.locals.oauth.token.User, videoPlaylist, UserRight.UPDATE_ANY_VIDEO_PLAYLIST, res)) return