mirror of https://github.com/Chocobozzz/PeerTube
Fix index search
parent
43b513660b
commit
e5abb482c3
|
@ -94,7 +94,7 @@ async function searchVideoChannelsIndex (query: VideoChannelsSearchQuery, res: e
|
||||||
try {
|
try {
|
||||||
logger.debug('Doing video channels search index request on %s.', url, { body })
|
logger.debug('Doing video channels search index request on %s.', url, { body })
|
||||||
|
|
||||||
const searchIndexResult = await doJSONRequest<ResultList<VideoChannel>>(url, { json: body })
|
const { body: searchIndexResult } = await doJSONRequest<ResultList<VideoChannel>>(url, { method: 'POST', json: body })
|
||||||
|
|
||||||
return res.json(searchIndexResult)
|
return res.json(searchIndexResult)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -186,7 +186,7 @@ async function searchVideosIndex (query: VideosSearchQuery, res: express.Respons
|
||||||
try {
|
try {
|
||||||
logger.debug('Doing videos search index request on %s.', url, { body })
|
logger.debug('Doing videos search index request on %s.', url, { body })
|
||||||
|
|
||||||
const searchIndexResult = await doJSONRequest<ResultList<Video>>(url, { json: body })
|
const { body: searchIndexResult } = await doJSONRequest<ResultList<Video>>(url, { method: 'POST', json: body })
|
||||||
|
|
||||||
return res.json(searchIndexResult)
|
return res.json(searchIndexResult)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue