aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-20 16:59:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-20 17:11:38 +0200
commit1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1 (patch)
tree1a2601d63152da4906335c6116ba5f1e8992af33 /server/controllers/api
parente861452fb26553177ad4e32bfb18b4fd8a5b1816 (diff)
downloadPeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.tar.gz
PeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.tar.zst
PeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.zip
Server: make friends urls come from the request instead of the
configuration file
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/v1/pods.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/v1/pods.js
index f61f2a483..982a1e364 100644
--- a/server/controllers/api/v1/pods.js
+++ b/server/controllers/api/v1/pods.js
@@ -19,7 +19,7 @@ const Video = mongoose.model('Video')
19 19
20router.get('/', listPodsUrl) 20router.get('/', listPodsUrl)
21router.post('/', validators.podsAdd, addPods) 21router.post('/', validators.podsAdd, addPods)
22router.get('/makefriends', 22router.post('/makefriends',
23 oAuth.authenticate, 23 oAuth.authenticate,
24 admin.ensureIsAdmin, 24 admin.ensureIsAdmin,
25 validators.makeFriends, 25 validators.makeFriends,
@@ -83,7 +83,9 @@ function listPodsUrl (req, res, next) {
83} 83}
84 84
85function makeFriends (req, res, next) { 85function makeFriends (req, res, next) {
86 friends.makeFriends(function (err) { 86 const urls = req.body.urls
87
88 friends.makeFriends(urls, function (err) {
87 if (err) return next(err) 89 if (err) return next(err)
88 90
89 res.type('json').status(204).end() 91 res.type('json').status(204).end()