From ab632f438efed53e3ed4ba08dd73cc666366af2b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Oct 2021 14:12:45 +0200 Subject: Fix channel handle search --- server/controllers/api/search/search-video-channels.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') 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 } function searchVideoChannels (req: express.Request, res: express.Response) { const query = pickSearchChannelQuery(req.query) - let search = query.search || '' + const search = query.search || '' const parts = search.split('@') @@ -58,7 +58,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) { if (isURISearch(search) || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res) // @username -> username to search in DB - if (search.startsWith('@')) search = search.replace(/^@/, '') + if (search.startsWith('@')) query.search = search.replace(/^@/, '') if (isSearchIndexSearch(query)) { return searchVideoChannelsIndex(query, res) -- cgit v1.2.3