X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Factivitypub%2Fclient.ts;h=d7de1b9bdba4636ec7ff618e1904241db1c480da;hb=cf21b2cbef61929177b9c09b5e017c3b7eb8535d;hp=444a8abaa7e4055eb692066f1184e4f19729c35f;hpb=71d4af1efc810f853e1a0d986bf758c201692594;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 444a8abaa..d7de1b9bd 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts @@ -31,7 +31,6 @@ import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from ' import { AccountModel } from '../../models/account/account' import { AccountVideoRateModel } from '../../models/account/account-video-rate' import { ActorFollowModel } from '../../models/actor/actor-follow' -import { VideoModel } from '../../models/video/video' import { VideoCaptionModel } from '../../models/video/video-caption' import { VideoCommentModel } from '../../models/video/video-comment' import { VideoPlaylistModel } from '../../models/video/video-playlist' @@ -44,7 +43,7 @@ activityPubClientRouter.use(cors()) // Intercept ActivityPub client requests activityPubClientRouter.get( - [ '/accounts?/:name', '/accounts?/:name/video-channels' ], + [ '/accounts?/:name', '/accounts?/:name/video-channels', '/a/:name', '/a/:name/video-channels' ], executeIfActivityPub, asyncMiddleware(localAccountValidator), accountController @@ -75,7 +74,8 @@ activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId', getAccountVideoRateFactory('dislike') ) -activityPubClientRouter.get('/videos/watch/:id', +activityPubClientRouter.get( + [ '/videos/watch/:id', '/w/:id' ], executeIfActivityPub, asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.ACTIVITY_PUB.VIDEOS)), asyncMiddleware(videosCustomGetValidator('all')), @@ -123,7 +123,7 @@ activityPubClientRouter.get('/videos/watch/:videoId/comments/:commentId/activity ) activityPubClientRouter.get( - [ '/video-channels/:name', '/video-channels/:name/videos' ], + [ '/video-channels/:name', '/video-channels/:name/videos', '/c/:name', '/c/:name/videos' ], executeIfActivityPub, asyncMiddleware(localVideoChannelValidator), videoChannelController @@ -155,7 +155,8 @@ activityPubClientRouter.get('/redundancy/streaming-playlists/:streamingPlaylistT asyncMiddleware(videoRedundancyController) ) -activityPubClientRouter.get('/video-playlists/:playlistId', +activityPubClientRouter.get( + [ '/video-playlists/:playlistId', '/videos/watch/playlist/:playlistId', '/w/p/:playlistId' ], executeIfActivityPub, asyncMiddleware(videoPlaylistsGetValidator('all')), asyncMiddleware(videoPlaylistController)