diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 17:30:46 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:43:01 +0100 |
commit | a2431b7dcbc72c05101dcdbe631ff84a823aeb51 (patch) | |
tree | 09278a822905622a70ff976a75e09d99bc45639a /server/controllers/activitypub | |
parent | fcaf1e0aa84213a1b1f1b1a44a3276eae35ebe70 (diff) | |
download | PeerTube-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.ts | 10 |
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' | |||
19 | const activityPubClientRouter = express.Router() | 19 | const activityPubClientRouter = express.Router() |
20 | 20 | ||
21 | activityPubClientRouter.get('/account/:name', | 21 | activityPubClientRouter.get('/account/:name', |
22 | executeIfActivityPub(localAccountValidator), | 22 | executeIfActivityPub(asyncMiddleware(localAccountValidator)), |
23 | executeIfActivityPub(accountController) | 23 | executeIfActivityPub(accountController) |
24 | ) | 24 | ) |
25 | 25 | ||
26 | activityPubClientRouter.get('/account/:name/followers', | 26 | activityPubClientRouter.get('/account/:name/followers', |
27 | executeIfActivityPub(localAccountValidator), | 27 | executeIfActivityPub(asyncMiddleware(localAccountValidator)), |
28 | executeIfActivityPub(asyncMiddleware(accountFollowersController)) | 28 | executeIfActivityPub(asyncMiddleware(accountFollowersController)) |
29 | ) | 29 | ) |
30 | 30 | ||
31 | activityPubClientRouter.get('/account/:name/following', | 31 | activityPubClientRouter.get('/account/:name/following', |
32 | executeIfActivityPub(localAccountValidator), | 32 | executeIfActivityPub(asyncMiddleware(localAccountValidator)), |
33 | executeIfActivityPub(asyncMiddleware(accountFollowingController)) | 33 | executeIfActivityPub(asyncMiddleware(accountFollowingController)) |
34 | ) | 34 | ) |
35 | 35 | ||
36 | activityPubClientRouter.get('/videos/watch/:id', | 36 | activityPubClientRouter.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 | ||
46 | activityPubClientRouter.get('/video-channels/:id', | 46 | activityPubClientRouter.get('/video-channels/:id', |
47 | executeIfActivityPub(videoChannelsGetValidator), | 47 | executeIfActivityPub(asyncMiddleware(videoChannelsGetValidator)), |
48 | executeIfActivityPub(asyncMiddleware(videoChannelController)) | 48 | executeIfActivityPub(asyncMiddleware(videoChannelController)) |
49 | ) | 49 | ) |
50 | 50 | ||