aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/search.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-16 15:25:20 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commit06a05d5f4784a7cbb27aa1188385b5679845dad8 (patch)
treeac197f3ed0768529456225ad76c912f22bc55e29 /server/controllers/api/search.ts
parent4bda2e47bbc937c401ddcf14c1be53c70481a294 (diff)
downloadPeerTube-06a05d5f4784a7cbb27aa1188385b5679845dad8.tar.gz
PeerTube-06a05d5f4784a7cbb27aa1188385b5679845dad8.tar.zst
PeerTube-06a05d5f4784a7cbb27aa1188385b5679845dad8.zip
Add subscriptions endpoints to REST API
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r--server/controllers/api/search.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index f810c7452..7a7504b7d 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -36,7 +36,10 @@ export { searchRouter }
36async function searchVideos (req: express.Request, res: express.Response) { 36async function searchVideos (req: express.Request, res: express.Response) {
37 const query: VideosSearchQuery = req.query 37 const query: VideosSearchQuery = req.query
38 38
39 const options = Object.assign(query, { nsfw: buildNSFWFilter(res, query.nsfw) }) 39 const options = Object.assign(query, {
40 includeLocalVideos: true,
41 nsfw: buildNSFWFilter(res, query.nsfw)
42 })
40 const resultList = await VideoModel.searchAndPopulateAccountAndServer(options) 43 const resultList = await VideoModel.searchAndPopulateAccountAndServer(options)
41 44
42 return res.json(getFormattedObjects(resultList.data, resultList.total)) 45 return res.json(getFormattedObjects(resultList.data, resultList.total))