diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-14 10:07:57 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-14 10:07:57 +0100 |
commit | d48ff09d27d234425c3e9f091ae9072d8e6d8b7a (patch) | |
tree | 3a842b79aec40ca55d68c1cb6cf9b8aadcf2a1d1 /server/middlewares/validators/video-channels.ts | |
parent | 94edfc3b2a9cf83f1c9c470a76e4769bc37aad14 (diff) | |
download | PeerTube-d48ff09d27d234425c3e9f091ae9072d8e6d8b7a.tar.gz PeerTube-d48ff09d27d234425c3e9f091ae9072d8e6d8b7a.tar.zst PeerTube-d48ff09d27d234425c3e9f091ae9072d8e6d8b7a.zip |
Use sequelize scopes
Diffstat (limited to 'server/middlewares/validators/video-channels.ts')
-rw-r--r-- | server/middlewares/validators/video-channels.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 = [ | |||
78 | if (!await isVideoChannelExist(req.params.id, res)) return | 78 | if (!await isVideoChannelExist(req.params.id, res)) return |
79 | 79 | ||
80 | // Check if the user who did the request is able to delete the video | 80 | // Check if the user who did the request is able to delete the video |
81 | if (!checkUserCanDeleteVideoChannel(res.locals.user, res.locals.videoChannel, res)) return | 81 | if (!checkUserCanDeleteVideoChannel(res.locals.oauth.token.User, res.locals.videoChannel, res)) return |
82 | if (!await checkVideoChannelIsNotTheLastOne(res)) return | 82 | if (!await checkVideoChannelIsNotTheLastOne(res)) return |
83 | 83 | ||
84 | return next() | 84 | return next() |