aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/config.ts2
-rw-r--r--server/controllers/api/search.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 1d48b4b26..b80ea4902 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -463,7 +463,7 @@ function customConfig (): CustomConfig {
463 disableLocalSearch: CONFIG.SEARCH.SEARCH_INDEX.DISABLE_LOCAL_SEARCH, 463 disableLocalSearch: CONFIG.SEARCH.SEARCH_INDEX.DISABLE_LOCAL_SEARCH,
464 isDefaultSearch: CONFIG.SEARCH.SEARCH_INDEX.IS_DEFAULT_SEARCH 464 isDefaultSearch: CONFIG.SEARCH.SEARCH_INDEX.IS_DEFAULT_SEARCH
465 } 465 }
466 }, 466 }
467 } 467 }
468} 468}
469 469
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index e08e1d79f..1dea77d29 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -76,7 +76,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) {
76 // @username -> username to search in DB 76 // @username -> username to search in DB
77 if (query.search.startsWith('@')) query.search = query.search.replace(/^@/, '') 77 if (query.search.startsWith('@')) query.search = query.search.replace(/^@/, '')
78 78
79 if (isSearchIndexEnabled(query)) { 79 if (isSearchIndexSearch(query)) {
80 return searchVideoChannelsIndex(query, res) 80 return searchVideoChannelsIndex(query, res)
81 } 81 }
82 82
@@ -157,7 +157,7 @@ function searchVideos (req: express.Request, res: express.Response) {
157 return searchVideoURI(search, res) 157 return searchVideoURI(search, res)
158 } 158 }
159 159
160 if (isSearchIndexEnabled(query)) { 160 if (isSearchIndexSearch(query)) {
161 return searchVideosIndex(query, res) 161 return searchVideosIndex(query, res)
162 } 162 }
163 163
@@ -226,7 +226,7 @@ async function searchVideoURI (url: string, res: express.Response) {
226 }) 226 })
227} 227}
228 228
229function isSearchIndexEnabled (query: SearchTargetQuery) { 229function isSearchIndexSearch (query: SearchTargetQuery) {
230 if (query.searchTarget === 'search-index') return true 230 if (query.searchTarget === 'search-index') return true
231 231
232 const searchIndexConfig = CONFIG.SEARCH.SEARCH_INDEX 232 const searchIndexConfig = CONFIG.SEARCH.SEARCH_INDEX