aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1
diff options
context:
space:
mode:
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',