diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-16 15:25:20 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | 06a05d5f4784a7cbb27aa1188385b5679845dad8 (patch) | |
tree | ac197f3ed0768529456225ad76c912f22bc55e29 /server/controllers/api/search.ts | |
parent | 4bda2e47bbc937c401ddcf14c1be53c70481a294 (diff) | |
download | PeerTube-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.ts | 5 |
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 } | |||
36 | async function searchVideos (req: express.Request, res: express.Response) { | 36 | async 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)) |