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