aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-01 14:23:50 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-01 14:23:50 +0200
commit1ab844d8593fa84dfe65cad6b5bbf0e45efd7886 (patch)
tree2687c7f66caff9ed57b4adde2e6ae804016295d3 /server/controllers/api/v1
parent825a5d9c5e6d8cbe005b44499aba4ce4ba069fe3 (diff)
downloadPeerTube-1ab844d8593fa84dfe65cad6b5bbf0e45efd7886.tar.gz
PeerTube-1ab844d8593fa84dfe65cad6b5bbf0e45efd7886.tar.zst
PeerTube-1ab844d8593fa84dfe65cad6b5bbf0e45efd7886.zip
Server: add port when making friends if it is not specified
Diffstat (limited to 'server/controllers/api/v1')
-rw-r--r--server/controllers/api/v1/pods.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/v1/pods.js
index d509db964..8ffade578 100644
--- a/server/controllers/api/v1/pods.js
+++ b/server/controllers/api/v1/pods.js
@@ -10,6 +10,7 @@ const friends = require('../../../lib/friends')
10const middlewares = require('../../../middlewares') 10const middlewares = require('../../../middlewares')
11const admin = middlewares.admin 11const admin = middlewares.admin
12const oAuth = middlewares.oauth 12const oAuth = middlewares.oauth
13const podsMiddleware = middlewares.pods
13const checkSignature = middlewares.secure.checkSignature 14const checkSignature = middlewares.secure.checkSignature
14const validators = middlewares.validators.pods 15const validators = middlewares.validators.pods
15const signatureValidator = middlewares.validators.remote.signature 16const signatureValidator = middlewares.validators.remote.signature
@@ -19,11 +20,16 @@ const Pod = mongoose.model('Pod')
19const Video = mongoose.model('Video') 20const Video = mongoose.model('Video')
20 21
21router.get('/', listPods) 22router.get('/', listPods)
22router.post('/', validators.podsAdd, addPods) 23router.post('/',
24 validators.podsAdd,
25 podsMiddleware.setBodyUrlPort,
26 addPods
27)
23router.post('/makefriends', 28router.post('/makefriends',
24 oAuth.authenticate, 29 oAuth.authenticate,
25 admin.ensureIsAdmin, 30 admin.ensureIsAdmin,
26 validators.makeFriends, 31 validators.makeFriends,
32 podsMiddleware.setBodyUrlsPort,
27 makeFriends 33 makeFriends
28) 34)
29router.get('/quitfriends', 35router.get('/quitfriends',