From 453e83ea5d81d203ba34bc43cd5c2c750ba40568 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Aug 2019 11:53:26 +0200 Subject: Stronger model typings --- server/middlewares/validators/videos/video-abuses.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/videos/video-abuses.ts') diff --git a/server/middlewares/validators/videos/video-abuses.ts b/server/middlewares/validators/videos/video-abuses.ts index e27d91bb1..a4aef4024 100644 --- a/server/middlewares/validators/videos/video-abuses.ts +++ b/server/middlewares/validators/videos/video-abuses.ts @@ -33,7 +33,7 @@ const videoAbuseGetValidator = [ if (areValidationErrors(req, res)) return if (!await doesVideoExist(req.params.videoId, res)) return - if (!await doesVideoAbuseExist(req.params.id, res.locals.video.id, res)) return + if (!await doesVideoAbuseExist(req.params.id, res.locals.videoAll.id, res)) return return next() } @@ -54,7 +54,7 @@ const videoAbuseUpdateValidator = [ if (areValidationErrors(req, res)) return if (!await doesVideoExist(req.params.videoId, res)) return - if (!await doesVideoAbuseExist(req.params.id, res.locals.video.id, res)) return + if (!await doesVideoAbuseExist(req.params.id, res.locals.videoAll.id, res)) return return next() } -- cgit v1.2.3