aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts7
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',
78activityPubClientRouter.get('/videos/watch/:id', 78activityPubClientRouter.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)
84activityPubClientRouter.get('/videos/watch/:id/activity', 84activityPubClientRouter.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)
89activityPubClientRouter.get('/videos/watch/:id/announces', 89activityPubClientRouter.get('/videos/watch/:id/announces',
@@ -222,8 +222,7 @@ function getAccountVideoRateFactory (rateType: VideoRateType) {
222} 222}
223 223
224async function videoController (req: express.Request, res: express.Response) { 224async 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