aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js
index 1f7d30eef..0be7d9d83 100644
--- a/server/controllers/api/videos.js
+++ b/server/controllers/api/videos.js
@@ -635,10 +635,11 @@ function reportVideoAbuse (req, res, finalCallback) {
635function addVideoToBlacklist (req, res, next) { 635function addVideoToBlacklist (req, res, next) {
636 const videoInstance = res.locals.video 636 const videoInstance = res.locals.video
637 637
638 db.BlacklistedVideo.create({ 638 const toCreate = {
639 videoId: videoInstance.id 639 videoId: videoInstance.id
640 }) 640 }
641 .asCallback(function (err) { 641
642 db.BlacklistedVideo.create(toCreate).asCallback(function (err) {
642 if (err) { 643 if (err) {
643 logger.error('Errors when blacklisting video ', { error: err }) 644 logger.error('Errors when blacklisting video ', { error: err })
644 return next(err) 645 return next(err)