diff options
Diffstat (limited to 'server/controllers/api/v1/pods.js')
-rw-r--r-- | server/controllers/api/v1/pods.js | 13 |
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 | ||
5 | const logger = require('../../../helpers/logger') | 5 | const logger = require('../../../helpers/logger') |
6 | const friends = require('../../../lib/friends') | 6 | const friends = require('../../../lib/friends') |
7 | const middleware = require('../../../middlewares') | 7 | const middlewares = require('../../../middlewares') |
8 | const Pods = require('../../../models/pods') | 8 | const Pods = require('../../../models/pods') |
9 | const reqValidator = middleware.reqValidators.pods | 9 | const oAuth2 = middlewares.oauth2 |
10 | const secureMiddleware = middleware.secure | 10 | const reqValidator = middlewares.reqValidators.pods |
11 | const secureRequest = middleware.reqValidators.remote.secureRequest | 11 | const secureMiddleware = middlewares.secure |
12 | const secureRequest = middlewares.reqValidators.remote.secureRequest | ||
12 | const videos = require('../../../lib/videos') | 13 | const videos = require('../../../lib/videos') |
13 | const Videos = require('../../../models/videos') | 14 | const Videos = require('../../../models/videos') |
14 | 15 | ||
@@ -16,8 +17,8 @@ const router = express.Router() | |||
16 | 17 | ||
17 | router.get('/', listPods) | 18 | router.get('/', listPods) |
18 | router.post('/', reqValidator.podsAdd, addPods) | 19 | router.post('/', reqValidator.podsAdd, addPods) |
19 | router.get('/makefriends', reqValidator.makeFriends, makeFriends) | 20 | router.get('/makefriends', oAuth2.authenticate, reqValidator.makeFriends, makeFriends) |
20 | router.get('/quitfriends', quitFriends) | 21 | router.get('/quitfriends', oAuth2.authenticate, quitFriends) |
21 | // Post because this is a secured request | 22 | // Post because this is a secured request |
22 | router.post('/remove', secureRequest, secureMiddleware.decryptBody, removePods) | 23 | router.post('/remove', secureRequest, secureMiddleware.decryptBody, removePods) |
23 | 24 | ||