diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/v1/pods.js | 6 |
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 | ||
20 | router.get('/', listPodsUrl) | 20 | router.get('/', listPodsUrl) |
21 | router.post('/', validators.podsAdd, addPods) | 21 | router.post('/', validators.podsAdd, addPods) |
22 | router.get('/makefriends', | 22 | router.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 | ||
85 | function makeFriends (req, res, next) { | 85 | function 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() |