aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-23 14:48:59 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-23 14:48:59 +0200
commit9ab1071c8d90d112f1031cf006ed621011553e84 (patch)
tree5fa2c9442b4366686adcb5b3a135ca75e8af0cb5 /server/controllers
parent6be622478a36a20ec36605c772b20009d9d270ac (diff)
downloadPeerTube-9ab1071c8d90d112f1031cf006ed621011553e84.tar.gz
PeerTube-9ab1071c8d90d112f1031cf006ed621011553e84.tar.zst
PeerTube-9ab1071c8d90d112f1031cf006ed621011553e84.zip
Do not wait the make friends process ends to send a response to the
request
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/v1/pods.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/v1/pods.js
index 982a1e364..360575a0d 100644
--- a/server/controllers/api/v1/pods.js
+++ b/server/controllers/api/v1/pods.js
@@ -86,10 +86,15 @@ function makeFriends (req, res, next) {
86 const urls = req.body.urls 86 const urls = req.body.urls
87 87
88 friends.makeFriends(urls, function (err) { 88 friends.makeFriends(urls, function (err) {
89 if (err) return next(err) 89 if (err) {
90 logger.error('Could not make friends.', { error: err })
91 return
92 }
90 93
91 res.type('json').status(204).end() 94 logger.info('Made friends!')
92 }) 95 })
96
97 res.type('json').status(204).end()
93} 98}
94 99
95function removePods (req, res, next) { 100function removePods (req, res, next) {