diff options
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', |