aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/pods.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/pods.ts')
-rw-r--r--server/controllers/api/pods.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/controllers/api/pods.ts b/server/controllers/api/pods.ts
index f662f1c03..2231a05fa 100644
--- a/server/controllers/api/pods.ts
+++ b/server/controllers/api/pods.ts
@@ -11,6 +11,9 @@ import { setFollowingSort } from '../../middlewares/sort'
11import { followValidator } from '../../middlewares/validators/pods' 11import { followValidator } from '../../middlewares/validators/pods'
12import { followersSortValidator, followingSortValidator } from '../../middlewares/validators/sort' 12import { followersSortValidator, followingSortValidator } from '../../middlewares/validators/sort'
13import { sendFollow } from '../../lib/activitypub/send-request' 13import { sendFollow } from '../../lib/activitypub/send-request'
14import { authenticate } from '../../middlewares/oauth'
15import { ensureUserHasRight } from '../../middlewares/user-right'
16import { UserRight } from '../../../shared/models/users/user-right.enum'
14 17
15const podsRouter = express.Router() 18const podsRouter = express.Router()
16 19
@@ -23,6 +26,8 @@ podsRouter.get('/following',
23) 26)
24 27
25podsRouter.post('/follow', 28podsRouter.post('/follow',
29 authenticate,
30 ensureUserHasRight(UserRight.MANAGE_PEERTUBE_FOLLOW),
26 followValidator, 31 followValidator,
27 setBodyHostsPort, 32 setBodyHostsPort,
28 asyncMiddleware(follow) 33 asyncMiddleware(follow)