From d48ff09d27d234425c3e9f091ae9072d8e6d8b7a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Dec 2017 10:07:57 +0100 Subject: Use sequelize scopes --- server/middlewares/validators/video-channels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/video-channels.ts b/server/middlewares/validators/video-channels.ts index 660390080..068fd210f 100644 --- a/server/middlewares/validators/video-channels.ts +++ b/server/middlewares/validators/video-channels.ts @@ -78,7 +78,7 @@ const videoChannelsRemoveValidator = [ if (!await isVideoChannelExist(req.params.id, res)) return // Check if the user who did the request is able to delete the video - if (!checkUserCanDeleteVideoChannel(res.locals.user, res.locals.videoChannel, res)) return + if (!checkUserCanDeleteVideoChannel(res.locals.oauth.token.User, res.locals.videoChannel, res)) return if (!await checkVideoChannelIsNotTheLastOne(res)) return return next() -- cgit v1.2.3