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'
// 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
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')),
)
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
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)