diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-01 14:23:50 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-01 14:23:50 +0200 |
commit | 1ab844d8593fa84dfe65cad6b5bbf0e45efd7886 (patch) | |
tree | 2687c7f66caff9ed57b4adde2e6ae804016295d3 /server/controllers/api | |
parent | 825a5d9c5e6d8cbe005b44499aba4ce4ba069fe3 (diff) | |
download | PeerTube-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')
-rw-r--r-- | server/controllers/api/v1/pods.js | 8 |
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') | |||
10 | const middlewares = require('../../../middlewares') | 10 | const middlewares = require('../../../middlewares') |
11 | const admin = middlewares.admin | 11 | const admin = middlewares.admin |
12 | const oAuth = middlewares.oauth | 12 | const oAuth = middlewares.oauth |
13 | const podsMiddleware = middlewares.pods | ||
13 | const checkSignature = middlewares.secure.checkSignature | 14 | const checkSignature = middlewares.secure.checkSignature |
14 | const validators = middlewares.validators.pods | 15 | const validators = middlewares.validators.pods |
15 | const signatureValidator = middlewares.validators.remote.signature | 16 | const signatureValidator = middlewares.validators.remote.signature |
@@ -19,11 +20,16 @@ const Pod = mongoose.model('Pod') | |||
19 | const Video = mongoose.model('Video') | 20 | const Video = mongoose.model('Video') |
20 | 21 | ||
21 | router.get('/', listPods) | 22 | router.get('/', listPods) |
22 | router.post('/', validators.podsAdd, addPods) | 23 | router.post('/', |
24 | validators.podsAdd, | ||
25 | podsMiddleware.setBodyUrlPort, | ||
26 | addPods | ||
27 | ) | ||
23 | router.post('/makefriends', | 28 | router.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 | ) |
29 | router.get('/quitfriends', | 35 | router.get('/quitfriends', |