diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/client.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 1982e171d..444a8abaa 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -78,12 +78,12 @@ activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId', | |||
78 | activityPubClientRouter.get('/videos/watch/:id', | 78 | activityPubClientRouter.get('/videos/watch/:id', |
79 | executeIfActivityPub, | 79 | executeIfActivityPub, |
80 | asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.ACTIVITY_PUB.VIDEOS)), | 80 | asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.ACTIVITY_PUB.VIDEOS)), |
81 | asyncMiddleware(videosCustomGetValidator('only-video-with-rights')), | 81 | asyncMiddleware(videosCustomGetValidator('all')), |
82 | asyncMiddleware(videoController) | 82 | asyncMiddleware(videoController) |
83 | ) | 83 | ) |
84 | activityPubClientRouter.get('/videos/watch/:id/activity', | 84 | activityPubClientRouter.get('/videos/watch/:id/activity', |
85 | executeIfActivityPub, | 85 | executeIfActivityPub, |
86 | asyncMiddleware(videosCustomGetValidator('only-video-with-rights')), | 86 | asyncMiddleware(videosCustomGetValidator('all')), |
87 | asyncMiddleware(videoController) | 87 | asyncMiddleware(videoController) |
88 | ) | 88 | ) |
89 | activityPubClientRouter.get('/videos/watch/:id/announces', | 89 | activityPubClientRouter.get('/videos/watch/:id/announces', |
@@ -222,8 +222,7 @@ function getAccountVideoRateFactory (rateType: VideoRateType) { | |||
222 | } | 222 | } |
223 | 223 | ||
224 | async function videoController (req: express.Request, res: express.Response) { | 224 | async function videoController (req: express.Request, res: express.Response) { |
225 | // We need more attributes | 225 | const video = res.locals.videoAll |
226 | const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(res.locals.onlyVideoWithRights.id) | ||
227 | 226 | ||
228 | if (redirectIfNotOwned(video.url, res)) return | 227 | if (redirectIfNotOwned(video.url, res)) return |
229 | 228 | ||