aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-22 14:03:50 +0200
committerChocobozzz <me@florianbigard.com>2022-06-22 14:03:50 +0200
commit2c2befaacaa7063df0d4557b71c187ee168a8eb6 (patch)
treeed31dba97ff754d6d20f32bf7eec10e580afa121 /server/middlewares/validators/videos
parentff9d43f62a4f4737c5bfe955883b48c5440f323a (diff)
downloadPeerTube-2c2befaacaa7063df0d4557b71c187ee168a8eb6.tar.gz
PeerTube-2c2befaacaa7063df0d4557b71c187ee168a8eb6.tar.zst
PeerTube-2c2befaacaa7063df0d4557b71c187ee168a8eb6.zip
Fix video right check
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/video-playlists.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts
index 241b9ed7b..d514ae0ad 100644
--- a/server/middlewares/validators/videos/video-playlists.ts
+++ b/server/middlewares/validators/videos/video-playlists.ts
@@ -33,7 +33,7 @@ import { logger } from '../../../helpers/logger'
33import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' 33import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
34import { VideoPlaylistElementModel } from '../../../models/video/video-playlist-element' 34import { VideoPlaylistElementModel } from '../../../models/video/video-playlist-element'
35import { MVideoPlaylist } from '../../../types/models/video/video-playlist' 35import { MVideoPlaylist } from '../../../types/models/video/video-playlist'
36import { authenticatePromiseIfNeeded } from '../../auth' 36import { authenticatePromise } from '../../auth'
37import { 37import {
38 areValidationErrors, 38 areValidationErrors,
39 doesVideoChannelIdExist, 39 doesVideoChannelIdExist,
@@ -161,7 +161,7 @@ const videoPlaylistsGetValidator = (fetchType: VideoPlaylistFetchType) => {
161 } 161 }
162 162
163 if (videoPlaylist.privacy === VideoPlaylistPrivacy.PRIVATE) { 163 if (videoPlaylist.privacy === VideoPlaylistPrivacy.PRIVATE) {
164 await authenticatePromiseIfNeeded(req, res) 164 await authenticatePromise(req, res)
165 165
166 const user = res.locals.oauth ? res.locals.oauth.token.User : null 166 const user = res.locals.oauth ? res.locals.oauth.token.User : null
167 167