aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/v1/pods.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-11-07 18:40:13 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-11-07 18:40:13 +0100
commitb60035d8e86b712e586550f762c26caae353dc0e (patch)
treea6dc088e5e48f93eb129e40672a7bea0d230a97c /routes/api/v1/pods.js
parente85782f7da44267e11714a63567feb7e0127126e (diff)
downloadPeerTube-b60035d8e86b712e586550f762c26caae353dc0e.tar.gz
PeerTube-b60035d8e86b712e586550f762c26caae353dc0e.tar.zst
PeerTube-b60035d8e86b712e586550f762c26caae353dc0e.zip
Middleware refractoring
Diffstat (limited to 'routes/api/v1/pods.js')
-rw-r--r--routes/api/v1/pods.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/routes/api/v1/pods.js b/routes/api/v1/pods.js
index 8ae676834..2bb8f89ab 100644
--- a/routes/api/v1/pods.js
+++ b/routes/api/v1/pods.js
@@ -4,7 +4,8 @@
4 var express = require('express') 4 var express = require('express')
5 var router = express.Router() 5 var router = express.Router()
6 var middleware = require('../../../middlewares') 6 var middleware = require('../../../middlewares')
7 var reqValidator = require('../../../middlewares/reqValidators').pods 7 var miscMiddleware = middleware.misc
8 var reqValidator = middleware.reqValidators.pods
8 var pods = require('../../../src/pods') 9 var pods = require('../../../src/pods')
9 10
10 function listPods (req, res, next) { 11 function listPods (req, res, next) {
@@ -31,9 +32,9 @@
31 }) 32 })
32 } 33 }
33 34
34 router.get('/', middleware.cache(false), listPods) 35 router.get('/', miscMiddleware.cache(false), listPods)
35 router.get('/makefriends', middleware.cache(false), makeFriends) 36 router.get('/makefriends', miscMiddleware.cache(false), makeFriends)
36 router.post('/', reqValidator.podsAdd, middleware.cache(false), addPods) 37 router.post('/', reqValidator.podsAdd, miscMiddleware.cache(false), addPods)
37 38
38 module.exports = router 39 module.exports = router
39})() 40})()