diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/search.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 353fd171b..7e1b7b230 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts | |||
@@ -85,8 +85,6 @@ function searchVideoChannels (req: express.Request, res: express.Response) { | |||
85 | } | 85 | } |
86 | 86 | ||
87 | async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: express.Response) { | 87 | async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: express.Response) { |
88 | logger.debug('Doing channels search on search index.') | ||
89 | |||
90 | const result = await buildMutedForSearchIndex(res) | 88 | const result = await buildMutedForSearchIndex(res) |
91 | 89 | ||
92 | const body = Object.assign(query, result) | 90 | const body = Object.assign(query, result) |
@@ -94,6 +92,8 @@ async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: e | |||
94 | const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/video-channels' | 92 | const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/video-channels' |
95 | 93 | ||
96 | try { | 94 | try { |
95 | logger.debug('Doing video channels search index request on %s.', url, { body }) | ||
96 | |||
97 | const searchIndexResult = await doRequest<ResultList<VideoChannel>>({ uri: url, body, json: true }) | 97 | const searchIndexResult = await doRequest<ResultList<VideoChannel>>({ uri: url, body, json: true }) |
98 | 98 | ||
99 | return res.json(searchIndexResult.body) | 99 | return res.json(searchIndexResult.body) |
@@ -166,8 +166,6 @@ function searchVideos (req: express.Request, res: express.Response) { | |||
166 | } | 166 | } |
167 | 167 | ||
168 | async function searchVideosIndex (query: VideosSearchQuery, res: express.Response) { | 168 | async function searchVideosIndex (query: VideosSearchQuery, res: express.Response) { |
169 | logger.debug('Doing videos search on search index.') | ||
170 | |||
171 | const result = await buildMutedForSearchIndex(res) | 169 | const result = await buildMutedForSearchIndex(res) |
172 | 170 | ||
173 | const body: VideosSearchQuery = Object.assign(query, result) | 171 | const body: VideosSearchQuery = Object.assign(query, result) |
@@ -186,6 +184,8 @@ async function searchVideosIndex (query: VideosSearchQuery, res: express.Respons | |||
186 | const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/videos' | 184 | const url = sanitizeUrl(CONFIG.SEARCH.SEARCH_INDEX.URL) + '/api/v1/search/videos' |
187 | 185 | ||
188 | try { | 186 | try { |
187 | logger.debug('Doing videos search index request on %s.', url, { body }) | ||
188 | |||
189 | const searchIndexResult = await doRequest<ResultList<Video>>({ uri: url, body, json: true }) | 189 | const searchIndexResult = await doRequest<ResultList<Video>>({ uri: url, body, json: true }) |
190 | 190 | ||
191 | return res.json(searchIndexResult.body) | 191 | return res.json(searchIndexResult.body) |