From 2c2befaacaa7063df0d4557b71c187ee168a8eb6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 22 Jun 2022 14:03:50 +0200 Subject: Fix video right check --- server/middlewares/validators/videos/video-playlists.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/videos') 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' import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' import { VideoPlaylistElementModel } from '../../../models/video/video-playlist-element' import { MVideoPlaylist } from '../../../types/models/video/video-playlist' -import { authenticatePromiseIfNeeded } from '../../auth' +import { authenticatePromise } from '../../auth' import { areValidationErrors, doesVideoChannelIdExist, @@ -161,7 +161,7 @@ const videoPlaylistsGetValidator = (fetchType: VideoPlaylistFetchType) => { } if (videoPlaylist.privacy === VideoPlaylistPrivacy.PRIVATE) { - await authenticatePromiseIfNeeded(req, res) + await authenticatePromise(req, res) const user = res.locals.oauth ? res.locals.oauth.token.User : null -- cgit v1.2.3