aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/remoteVideos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-10-30 17:51:40 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-10-30 17:51:40 +0100
commite63dc45fa368de478ba3b37eabbfb1c233988348 (patch)
tree1bdf706ff9a37bfd159ed4280bb336e4d46e6725 /routes/api/remoteVideos.js
parentdd0f21d1ea54389727fbf7e6333dd2585e1613d5 (diff)
downloadPeerTube-e63dc45fa368de478ba3b37eabbfb1c233988348.tar.gz
PeerTube-e63dc45fa368de478ba3b37eabbfb1c233988348.tar.zst
PeerTube-e63dc45fa368de478ba3b37eabbfb1c233988348.zip
Return next to send a 500 status code
Diffstat (limited to 'routes/api/remoteVideos.js')
-rw-r--r--routes/api/remoteVideos.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/api/remoteVideos.js b/routes/api/remoteVideos.js
index eed586d23..2ae3ce5bc 100644
--- a/routes/api/remoteVideos.js
+++ b/routes/api/remoteVideos.js
@@ -8,7 +8,7 @@
8 8
9 function addRemoteVideos (req, res, next) { 9 function addRemoteVideos (req, res, next) {
10 videos.addRemote(req.body.data, function (err, video) { 10 videos.addRemote(req.body.data, function (err, video) {
11 if (err) next(err) 11 if (err) return next(err)
12 12
13 res.json(video) 13 res.json(video)
14 }) 14 })
@@ -16,7 +16,7 @@
16 16
17 function removeRemoteVideo (req, res, next) { 17 function removeRemoteVideo (req, res, next) {
18 videos.removeRemote(req.body.signature.url, req.body.data.magnetUri, function (err) { 18 videos.removeRemote(req.body.signature.url, req.body.data.magnetUri, function (err) {
19 if (err) next(err) 19 if (err) return next(err)
20 20
21 res.status(204) 21 res.status(204)
22 }) 22 })