aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/pods.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/pods.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/pods.js')
-rw-r--r--routes/api/pods.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/api/pods.js b/routes/api/pods.js
index 3f9e85052..8fa29b4f7 100644
--- a/routes/api/pods.js
+++ b/routes/api/pods.js
@@ -8,7 +8,7 @@
8 8
9 function listPods (req, res, next) { 9 function listPods (req, res, next) {
10 pods.list(function (err, pods_list) { 10 pods.list(function (err, pods_list) {
11 if (err) next(err) 11 if (err) return next(err)
12 12
13 res.json(pods_list) 13 res.json(pods_list)
14 }) 14 })
@@ -16,7 +16,7 @@
16 16
17 function addPods (req, res, next) { 17 function addPods (req, res, next) {
18 pods.add(req.body.data, function (err, json) { 18 pods.add(req.body.data, function (err, json) {
19 if (err) next(err) 19 if (err) return next(err)
20 20
21 res.json(json) 21 res.json(json)
22 }) 22 })
@@ -24,7 +24,7 @@
24 24
25 function makeFriends (req, res, next) { 25 function makeFriends (req, res, next) {
26 pods.makeFriends(function (err) { 26 pods.makeFriends(function (err) {
27 if (err) next(err) 27 if (err) return next(err)
28 28
29 res.sendStatus(204) 29 res.sendStatus(204)
30 }) 30 })