aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-27 17:30:46 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:43:01 +0100
commita2431b7dcbc72c05101dcdbe631ff84a823aeb51 (patch)
tree09278a822905622a70ff976a75e09d99bc45639a /server/controllers/activitypub
parentfcaf1e0aa84213a1b1f1b1a44a3276eae35ebe70 (diff)
downloadPeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.tar.gz
PeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.tar.zst
PeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.zip
Refractor validators
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r--server/controllers/activitypub/client.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 41272bca0..62cde1fc7 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -19,22 +19,22 @@ import { VideoShareInstance } from '../../models/video/video-share-interface'
19const activityPubClientRouter = express.Router() 19const activityPubClientRouter = express.Router()
20 20
21activityPubClientRouter.get('/account/:name', 21activityPubClientRouter.get('/account/:name',
22 executeIfActivityPub(localAccountValidator), 22 executeIfActivityPub(asyncMiddleware(localAccountValidator)),
23 executeIfActivityPub(accountController) 23 executeIfActivityPub(accountController)
24) 24)
25 25
26activityPubClientRouter.get('/account/:name/followers', 26activityPubClientRouter.get('/account/:name/followers',
27 executeIfActivityPub(localAccountValidator), 27 executeIfActivityPub(asyncMiddleware(localAccountValidator)),
28 executeIfActivityPub(asyncMiddleware(accountFollowersController)) 28 executeIfActivityPub(asyncMiddleware(accountFollowersController))
29) 29)
30 30
31activityPubClientRouter.get('/account/:name/following', 31activityPubClientRouter.get('/account/:name/following',
32 executeIfActivityPub(localAccountValidator), 32 executeIfActivityPub(asyncMiddleware(localAccountValidator)),
33 executeIfActivityPub(asyncMiddleware(accountFollowingController)) 33 executeIfActivityPub(asyncMiddleware(accountFollowingController))
34) 34)
35 35
36activityPubClientRouter.get('/videos/watch/:id', 36activityPubClientRouter.get('/videos/watch/:id',
37 executeIfActivityPub(videosGetValidator), 37 executeIfActivityPub(asyncMiddleware(videosGetValidator)),
38 executeIfActivityPub(videoController) 38 executeIfActivityPub(videoController)
39) 39)
40 40
@@ -44,7 +44,7 @@ activityPubClientRouter.get('/videos/watch/:id/announces/:accountId',
44) 44)
45 45
46activityPubClientRouter.get('/video-channels/:id', 46activityPubClientRouter.get('/video-channels/:id',
47 executeIfActivityPub(videoChannelsGetValidator), 47 executeIfActivityPub(asyncMiddleware(videoChannelsGetValidator)),
48 executeIfActivityPub(asyncMiddleware(videoChannelController)) 48 executeIfActivityPub(asyncMiddleware(videoChannelController))
49) 49)
50 50