aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-10 09:25:26 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:40 +0100
commite5abb482c303e192c8eba15ff35bcad790c876bf (patch)
treea35e4790c9a48cc5a8b759fea39d4f5a94eb789f
parent43b513660bd79c72a5c567c3c1fea593886a5165 (diff)
downloadPeerTube-e5abb482c303e192c8eba15ff35bcad790c876bf.tar.gz
PeerTube-e5abb482c303e192c8eba15ff35bcad790c876bf.tar.zst
PeerTube-e5abb482c303e192c8eba15ff35bcad790c876bf.zip
Fix index search
-rw-r--r--server/controllers/api/search.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index 317b24fe9..57357b1e8 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -94,7 +94,7 @@ async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: e
94 try { 94 try {
95 logger.debug('Doing video channels search index request on %s.', url, { body }) 95 logger.debug('Doing video channels search index request on %s.', url, { body })
96 96
97 const searchIndexResult = await doJSONRequest<ResultList<VideoChannel>>(url, { json: body }) 97 const { body: searchIndexResult } = await doJSONRequest<ResultList<VideoChannel>>(url, { method: 'POST', json: body })
98 98
99 return res.json(searchIndexResult) 99 return res.json(searchIndexResult)
100 } catch (err) { 100 } catch (err) {
@@ -186,7 +186,7 @@ async function searchVideosIndex (query: VideosSearchQuery, res: express.Respons
186 try { 186 try {
187 logger.debug('Doing videos search index request on %s.', url, { body }) 187 logger.debug('Doing videos search index request on %s.', url, { body })
188 188
189 const searchIndexResult = await doJSONRequest<ResultList<Video>>(url, { json: body }) 189 const { body: searchIndexResult } = await doJSONRequest<ResultList<Video>>(url, { method: 'POST', json: body })
190 190
191 return res.json(searchIndexResult) 191 return res.json(searchIndexResult)
192 } catch (err) { 192 } catch (err) {