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.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/search/search-video-channels.ts b/server/controllers/api/search/search-video-channels.ts
index 25173ac20..089feed65 100644
--- a/server/controllers/api/search/search-video-channels.ts
+++ b/server/controllers/api/search/search-video-channels.ts
@@ -47,7 +47,7 @@ export { searchChannelsRouter }
47 47
48function searchVideoChannels (req: express.Request, res: express.Response) { 48function searchVideoChannels (req: express.Request, res: express.Response) {
49 const query = pickSearchChannelQuery(req.query) 49 const query = pickSearchChannelQuery(req.query)
50 let search = query.search || '' 50 const search = query.search || ''
51 51
52 const parts = search.split('@') 52 const parts = search.split('@')
53 53
@@ -58,7 +58,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) {
58 if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) 58 if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res)
59 59
60 // @username -> username to search in DB 60 // @username -> username to search in DB
61 if (search.startsWith('@')) search = search.replace(/^@/, '') 61 if (search.startsWith('@')) query.search = search.replace(/^@/, '')
62 62
63 if (isSearchIndexSearch(query)) { 63 if (isSearchIndexSearch(query)) {
64 return searchVideoChannelsIndex(query, res) 64 return searchVideoChannelsIndex(query, res)