aboutsummaryrefslogtreecommitdiffhomepage
path: root/controllers/api/v1/pods.js
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/api/v1/pods.js')
-rw-r--r--controllers/api/v1/pods.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/controllers/api/v1/pods.js b/controllers/api/v1/pods.js
index 82d8d7f08..3e457ec57 100644
--- a/controllers/api/v1/pods.js
+++ b/controllers/api/v1/pods.js
@@ -7,21 +7,22 @@
7 var logger = require('../../../helpers/logger') 7 var logger = require('../../../helpers/logger')
8 var friends = require('../../../lib/friends') 8 var friends = require('../../../lib/friends')
9 var middleware = require('../../../middlewares') 9 var middleware = require('../../../middlewares')
10 var miscMiddleware = middleware.misc 10 var cacheMiddleware = middleware.cache
11 var Pods = require('../../../models/pods') 11 var Pods = require('../../../models/pods')
12 var reqValidator = middleware.reqValidators.pods 12 var reqValidator = middleware.reqValidators.pods
13 var secureMiddleware = middleware.secure
13 var secureRequest = middleware.reqValidators.remote.secureRequest 14 var secureRequest = middleware.reqValidators.remote.secureRequest
14 var utils = require('../../../helpers/utils') 15 var utils = require('../../../helpers/utils')
15 var Videos = require('../../../models/videos') 16 var Videos = require('../../../models/videos')
16 17
17 var router = express.Router() 18 var router = express.Router()
18 19
19 router.get('/', miscMiddleware.cache(false), listPods) 20 router.get('/', cacheMiddleware.cache(false), listPods)
20 router.post('/', reqValidator.podsAdd, miscMiddleware.cache(false), addPods) 21 router.post('/', reqValidator.podsAdd, cacheMiddleware.cache(false), addPods)
21 router.get('/makefriends', reqValidator.makeFriends, miscMiddleware.cache(false), makeFriends) 22 router.get('/makefriends', reqValidator.makeFriends, cacheMiddleware.cache(false), makeFriends)
22 router.get('/quitfriends', miscMiddleware.cache(false), quitFriends) 23 router.get('/quitfriends', cacheMiddleware.cache(false), quitFriends)
23 // Post because this is a secured request 24 // Post because this is a secured request
24 router.post('/remove', secureRequest, miscMiddleware.decryptBody, removePods) 25 router.post('/remove', secureRequest, secureMiddleware.decryptBody, removePods)
25 26
26 // --------------------------------------------------------------------------- 27 // ---------------------------------------------------------------------------
27 28