Update video channel routes

This commit is contained in:
Chocobozzz 2018-04-24 17:05:32 +02:00
parent 82e392f8a4
commit 48dce1c90d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
16 changed files with 1169 additions and 796 deletions

View file

@ -33,15 +33,15 @@ async function generateFeed (req: express.Request, res: express.Response, next:
const account: AccountModel = res.locals.account
const hideNSFW = CONFIG.INSTANCE.DEFAULT_NSFW_POLICY === 'do_not_list'
const resultList = await VideoModel.listForApi(
const resultList = await VideoModel.listForApi({
start,
FEEDS.COUNT,
req.query.sort as VideoSortField,
count: FEEDS.COUNT,
sort: req.query.sort,
hideNSFW,
req.query.filter,
true,
account ? account.id : null
)
filter: req.query.filter,
withFiles: true,
accountId: account ? account.id : null
})
// Adding video items to the feed, one at a time
resultList.data.forEach(video => {