diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:12:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:12:45 +0200 |
commit | ab632f438efed53e3ed4ba08dd73cc666366af2b (patch) | |
tree | be073cb01a9fd3686da500d5dc918b4323031846 /server/controllers | |
parent | 8bd67ef6af84f322722abba0fe6f68a3ed7a6637 (diff) | |
download | PeerTube-ab632f438efed53e3ed4ba08dd73cc666366af2b.tar.gz PeerTube-ab632f438efed53e3ed4ba08dd73cc666366af2b.tar.zst PeerTube-ab632f438efed53e3ed4ba08dd73cc666366af2b.zip |
Fix channel handle search
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/search/search-video-channels.ts | 4 |
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 | ||
48 | function searchVideoChannels (req: express.Request, res: express.Response) { | 48 | function 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) |