1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Add playlist rest tests

This commit is contained in:
Chocobozzz 2019-03-05 10:58:44 +01:00 committed by Chocobozzz
parent 07b1a18aa6
commit df0b219d36
35 changed files with 1485 additions and 756 deletions

View file

@ -320,7 +320,10 @@ async function videoRedundancyController (req: express.Request, res: express.Res
async function videoPlaylistController (req: express.Request, res: express.Response) {
const playlist: VideoPlaylistModel = res.locals.videoPlaylist
const json = await playlist.toActivityPubObject()
// We need more attributes
playlist.OwnerAccount = await AccountModel.load(playlist.ownerAccountId)
const json = await playlist.toActivityPubObject(req.query.page, null)
const audience = getAudience(playlist.OwnerAccount.Actor, playlist.privacy === VideoPlaylistPrivacy.PUBLIC)
const object = audiencify(json, audience)