aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/search/search-video-channels.ts7
-rw-r--r--server/controllers/api/search/search-video-playlists.ts3
2 files changed, 6 insertions, 4 deletions
diff --git a/server/controllers/api/search/search-video-channels.ts b/server/controllers/api/search/search-video-channels.ts
index be0b6b9a2..9fc2d53a5 100644
--- a/server/controllers/api/search/search-video-channels.ts
+++ b/server/controllers/api/search/search-video-channels.ts
@@ -46,7 +46,7 @@ export { searchChannelsRouter }
46 46
47function searchVideoChannels (req: express.Request, res: express.Response) { 47function searchVideoChannels (req: express.Request, res: express.Response) {
48 const query: VideoChannelsSearchQuery = req.query 48 const query: VideoChannelsSearchQuery = req.query
49 const search = query.search 49 let search = query.search || ''
50 50
51 const parts = search.split('@') 51 const parts = search.split('@')
52 52
@@ -57,7 +57,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) {
57 if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) 57 if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res)
58 58
59 // @username -> username to search in DB 59 // @username -> username to search in DB
60 if (query.search.startsWith('@')) query.search = query.search.replace(/^@/, '') 60 if (search.startsWith('@')) search = search.replace(/^@/, '')
61 61
62 if (isSearchIndexSearch(query)) { 62 if (isSearchIndexSearch(query)) {
63 return searchVideoChannelsIndex(query, res) 63 return searchVideoChannelsIndex(query, res)
@@ -99,7 +99,8 @@ async function searchVideoChannelsDB (query: VideoChannelsSearchQuery, res: expr
99 start: query.start, 99 start: query.start,
100 count: query.count, 100 count: query.count,
101 sort: query.sort, 101 sort: query.sort,
102 host: query.host 102 host: query.host,
103 names: query.names
103 }, 'filter:api.search.video-channels.local.list.params') 104 }, 'filter:api.search.video-channels.local.list.params')
104 105
105 const resultList = await Hooks.wrapPromiseFun( 106 const resultList = await Hooks.wrapPromiseFun(
diff --git a/server/controllers/api/search/search-video-playlists.ts b/server/controllers/api/search/search-video-playlists.ts
index 60d1a44f7..bd6a2a564 100644
--- a/server/controllers/api/search/search-video-playlists.ts
+++ b/server/controllers/api/search/search-video-playlists.ts
@@ -89,7 +89,8 @@ async function searchVideoPlaylistsDB (query: VideoPlaylistsSearchQuery, res: ex
89 start: query.start, 89 start: query.start,
90 count: query.count, 90 count: query.count,
91 sort: query.sort, 91 sort: query.sort,
92 host: query.host 92 host: query.host,
93 uuids: query.uuids
93 }, 'filter:api.search.video-playlists.local.list.params') 94 }, 'filter:api.search.video-playlists.local.list.params')
94 95
95 const resultList = await Hooks.wrapPromiseFun( 96 const resultList = await Hooks.wrapPromiseFun(