diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-26 21:42:36 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-26 21:42:36 +0200 |
commit | ab683a8e0d998cfd9dfb9562d3c616f3e6e1dbfd (patch) | |
tree | 8f6d77c733b56a3778156eb717b188a1addc7676 /server/controllers/api/videos.js | |
parent | 32502eda29f67ef111391d751f61132f8103fda8 (diff) | |
download | PeerTube-ab683a8e0d998cfd9dfb9562d3c616f3e6e1dbfd.tar.gz PeerTube-ab683a8e0d998cfd9dfb9562d3c616f3e6e1dbfd.tar.zst PeerTube-ab683a8e0d998cfd9dfb9562d3c616f3e6e1dbfd.zip |
Format video blacklist
Diffstat (limited to 'server/controllers/api/videos.js')
-rw-r--r-- | server/controllers/api/videos.js | 7 |
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) { | |||
635 | function addVideoToBlacklist (req, res, next) { | 635 | function 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) |