From 6e46de095d7169355dd83030f6ce4a582304153a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Oct 2018 11:15:06 +0200 Subject: Add user history and resume videos --- server/controllers/api/search.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/controllers/api/search.ts') diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index fd4db7a54..4be2b5ef7 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts @@ -117,7 +117,8 @@ function searchVideos (req: express.Request, res: express.Response) { async function searchVideosDB (query: VideosSearchQuery, res: express.Response) { const options = Object.assign(query, { includeLocalVideos: true, - nsfw: buildNSFWFilter(res, query.nsfw) + nsfw: buildNSFWFilter(res, query.nsfw), + userId: res.locals.oauth ? res.locals.oauth.token.User.id : undefined }) const resultList = await VideoModel.searchAndPopulateAccountAndServer(options) -- cgit v1.2.3