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

Add subscriptions endpoints to REST API

This commit is contained in:
Chocobozzz 2018-08-16 15:25:20 +02:00
parent 4bda2e47bb
commit 06a05d5f47
36 changed files with 1039 additions and 94 deletions

View file

@ -36,7 +36,10 @@ export { searchRouter }
async function searchVideos (req: express.Request, res: express.Response) {
const query: VideosSearchQuery = req.query
const options = Object.assign(query, { nsfw: buildNSFWFilter(res, query.nsfw) })
const options = Object.assign(query, {
includeLocalVideos: true,
nsfw: buildNSFWFilter(res, query.nsfw)
})
const resultList = await VideoModel.searchAndPopulateAccountAndServer(options)
return res.json(getFormattedObjects(resultList.data, resultList.total))